-
Notifications
You must be signed in to change notification settings - Fork 6
feat(FilterListBox): add component #730
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
🦋 Changeset detectedLatest commit: 97d074b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 NPM canary releaseDeployed canary version 0.0.0-canary-804cf9f. |
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
🧪 Storybook is successfully deployed!
|
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.
Bug: Search Comparison Uses Incorrect Property
The doesTermExist
function in FilterListBox.tsx
incorrectly compares the search term against an item's key
instead of its displayed text content (textValue
or children
). This leads to duplicate custom options being shown when the search term matches an existing item's display text but not its key, as the function fails to identify the existing option. The comparison should be against the item's display text, ideally case-insensitively.
src/components/fields/FilterListBox/FilterListBox.tsx#L341-L351
cube-ui-kit/src/components/fields/FilterListBox/FilterListBox.tsx
Lines 341 to 351 in 97d074b
if (child.type === Item) { | |
const childText = | |
child.props.textValue || | |
(typeof child.props.children === 'string' | |
? child.props.children | |
: '') || | |
String(child.props.children ?? ''); | |
if (term === String(child.key)) { | |
exists = true; | |
} |
Bug: FieldWrapper Fails to Apply Styles Without Labels
The FieldWrapper
component now bypasses its rendering and returns the wrapped component directly when no label
prop is provided. This prevents components from receiving essential field-level functionalities, such as validation states, error messages, required indicators, descriptions, and other styling or accessibility features, which are needed regardless of label presence.
src/components/form/wrapper.tsx#L40-L43
cube-ui-kit/src/components/form/wrapper.tsx
Lines 40 to 43 in 97d074b
if (!label) { | |
return component; | |
} |
Was this report helpful? Give feedback by reacting with 👍 or 👎
No description provided.