hsuanyi-chou / shadcn-ui-expansions

More components built on top of shadcn-ui.
https://shadcnui-expansions.typeart.cc/
MIT License
567 stars 25 forks source link

Multiselect Clear all button #100

Closed Fala721 closed 1 week ago

Fala721 commented 3 weeks ago

Feature description

the multi select is great! it would be awesome if it had a clear all button similar to the one from "react-select" I assume it would be possible to build one using the ref, the problem is that the ref is not an internal one.

here is what i mean with a clear all button, in one screenshot the button is shown becaus a value is selected(in react-select) and when it is cleared it doesnt show.

Screenshot 2024-06-10 at 14 56 45 Screenshot 2024-06-10 at 14 56 37

Affected component/components

No response

Additional Context

Additional details here...

Before submitting

hsuanyi-chou commented 3 weeks ago

Sure thing. I'll add it.

But not too soon, I’ve been a little busy lately.

zougari47 commented 2 weeks ago

I created PR #104 for this feature.

hsuanyi-chou commented 1 week ago

Thank you so much.

hsuanyi-chou commented 1 week ago

I've added an example in document and added hideClearButton prop. Also fix an issue: do not show clear all button while selected values are only having fixed options.