-
Notifications
You must be signed in to change notification settings - Fork 773
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
feat(cyclops-ui): Dropdown menu to accept other then just enum fields #620
feat(cyclops-ui): Dropdown menu to accept other then just enum fields #620
Conversation
hey @petar-cvit can you please review this pr in your free time? |
@quest-bot loot #50 |
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.
Hey @s-vamshi, Iβm having trouble running this code. It seems that mode: βtags"
sends the values as arrays, which breaks on the backend. I would much rather prefer a dropdown that sends a single value instead of an array of one value.
Check an example of Select
with a Custom dropdown from AntDesign to get an idea of how you could implement this.
If it makes sense, you can extract it into a separate component (something like SuggestInput.tsx
perhaps).
Let me know if you can make it work and if you encounter issues with this approach!
Hey @KaradzaJuraj, thanks for the suggestions, I will use custom drop-down in a new component instead of making changes to SelectInput component! |
β¦r-then-just-enum-fields
Hey @KaradzaJuraj @petar-cvit added a new suggestionInput field using custom dropdown screen-capture.webm |
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.
Looks great @s-vamshi! Just one more change and we can add this to the codebase π
value={newOption} | ||
onChange={(event) => setNewOption(event.target.value)} | ||
onKeyDown={(e) => e.stopPropagation()} | ||
onKeyPress={(e) => e.key === "Enter" && addOptionOnEnter()} |
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.
OnKeyPress
is deprecated; can you move the functionality to onKeyDown
?
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.
hey @KaradzaJuraj, moved the logic to onkeydown!
hey @KaradzaJuraj done with the changes! |
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.
Awesome! Thanks for picking this up @s-vamshi π
closes #50
π Description
Dropdown menu to accept other then just enum fields when json key has x-suggestions
β Checks
βΉ Additional context
screen-capture.15.webm