-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Feat: support sort category #9178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds sorting functionality to categorize forms by implementing move up/down controls for category items. The change allows users to reorder categories dynamically through UI buttons.
Key changes:
- Added move functionality to the useFieldArray hook
- Implemented up/down arrow buttons for reordering categories
- Added move handler with boundary checks
web/src/pages/agent/form/categorize-form/dynamic-categorize.tsx
Outdated
Show resolved
Hide resolved
import humanId from 'human-id'; | ||
import trim from 'lodash/trim'; | ||
import { ChevronsUpDown, X } from 'lucide-react'; | ||
import { ChevronsUpDown,ChevronDown, ChevronUp, ChevronsUpDown, X } from 'lucide-react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Missing space after comma between 'ChevronsUpDown' and 'ChevronDown'. Consistent spacing in import statements improves readability.
import { ChevronsUpDown,ChevronDown, ChevronUp, ChevronsUpDown, X } from 'lucide-react'; | |
import { ChevronsUpDown, ChevronDown, ChevronUp, ChevronsUpDown, X } from 'lucide-react'; |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Could you elaborate on the scenario this feature deal with? |
What problem does this PR solve?
Feat: support sort category
Type of change