Conversation
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ase-ui into with-object-values
commit: |
|
@atomiks The base PR for this pull request has been merged into master. Could you please review this PR? |
|
@seongminn super sorry, this PR got away from me and I forgot to review it! Some thoughts:
|
|
@atomiks I always appreciate your feedback. |
| const serializedValue = React.useMemo(() => { | ||
| if (isMultiple && Array.isArray(value) && value.length === 0) { | ||
| return ''; | ||
| } | ||
| return stringifyAsValue(value, itemToStringValue); | ||
| }, [isMultiple, value, itemToStringValue]); |
There was a problem hiding this comment.
I think this also exists in the root, the logic could be reused between the three sites
There was a problem hiding this comment.
I have included serializedValue in the SelectRootContext! 38c7763
| @@ -406,6 +413,7 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>( | |||
| disabled, | |||
| readOnly, | |||
| multiple, | |||
| serializedValue, | |||
There was a problem hiding this comment.
This should be placed in the store sync effect where store.update(...) is called (like value is).
Also it seems serializedValue: createSelector((state: State) => { should be removed.
There was a problem hiding this comment.
I have incorporated all the points you mentioned!
…ase-ui into with-object-values
|
Thanks for the contribution! |
based on #2704
data-placeholderattribute toSelect.Valuewhen a placeholder item with no value is selected. This allows for applying custom styles. (1d928aa)