tremorlabs / tremor

React components to build charts and dashboards
https://npm.tremor.so
Apache License 2.0
16.22k stars 467 forks source link

[Bug]: I want to show the 'Select All' option all the time, even when searching in the multi-select #1101

Closed dhiraj-avasthi-pst closed 4 months ago

dhiraj-avasthi-pst commented 4 months ago

Tremor Version

15

Steps to reproduce

<MultiSelect>
        <MultiSelectItem value="all">Select All</MultiSelectItem>
        <MultiSelectItem value="1">Option 1</MultiSelectItem>
        <MultiSelectItem value="2">Option 2</MultiSelectItem>
        <MultiSelectItem value="3">Option 3</MultiSelectItem>
 </MultiSelect>

What is expected?

whenever we are searching for a field, suppose I search for option 1, it should show me Select All and option 1.

Screenshot 2024-07-09 at 10 36 06 PM

What is actually happening?

I don't have an option to manipulate the filter fields, as I want to show the 'Select All' option while filtering the options

What browsers are you seeing the problem on?

No response

Any additional comments?

https://github.dev/tremorlabs/tremor/blob/main/src/components/input-elements/MultiSelect/MultiSelect.tsx#L58

image
severinlandolt commented 4 months ago

Hi @dhiraj-avasthi-pst! Unfortunately, this is not possible with the current implementation of this MultiSelect component. We do not have plans to change this in the future, so you would have to build this yourself :)