-
Notifications
You must be signed in to change notification settings - Fork 545
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(SelectMenu/InputMenu): migrate create-item
prop to Reka
#2720
base: feat/reka-ui
Are you sure you want to change the base?
Conversation
ineshbose
commented
Nov 21, 2024
- re-implement for InputMenu
- waiting on bugfix - fix(combobox/item): fix some items not add into allItems map unovue/radix-vue#1368
@@ -204,33 +203,54 @@ function displayValue(value: T | T[]): string { | |||
return item && (typeof item === 'object' ? get(item, props.labelKey as string) : item) | |||
} | |||
|
|||
function filterFunction( |
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.
Note - we can get rid of this filterFunction; we can make use of useFilter
from reka-ui
. I just wonder about custom filter option when the guide for it is completed 🤔
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.
Also, to access the filtered options, we would need to use ComboboxRootContext (https://reka-ui.com/docs/guides/inject-context) so the SFC would need to be split
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.
Yeah we can't make our own filter with escapeRegExp
because it won't necessarily match the filter of Reka UI.
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.
Can you advise on if/how we should split the SFC to access the Combobox context? (as it should be child components)
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.
@zernonia Would you have some hint about this? What would be the best way to access the filtered items?
Why reintroduce |
Lets discuss under #2720 (comment) |
@@ -281,6 +302,7 @@ function onUpdateOpen(value: boolean) { | |||
:disabled="disabled" | |||
:multiple="multiple" | |||
:by="by" | |||
:ignore-filter="props.filter === false" |
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.
Why not keep using ignore-filter
? It's inherited from Combobox already and filter
prop has been removed already.
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.
OK I'll remove it - didn't spot that!