chakra-multiselect icon indicating copy to clipboard operation
chakra-multiselect copied to clipboard

Cant change EmptySelectResults

Open ibrahimakgn opened this issue 3 years ago • 2 comments

Hello,

I've tried to change EmptySelectResults label but it did not working.

<MultiSelect options={optionsFilter} value={selectedFilter} EmptySelectResults={{label:'Its changed'}} onChange={setSelectedFilter} />

Any idea?

ibrahimakgn avatar Oct 31 '23 12:10 ibrahimakgn

Hey there 👋. I don't know which prop you are referring to, the MultiSelect component has these props available:

https://bmartel.github.io/chakra-multiselect/docs/interfaces/MultiSelectProps.html

I realize the ask here is to make it configurable, which could be made to happen, though I don't know I agree with cluttering up the API with component overrides, the API of this library was more-so positioned to allow more composition of the underlying building blocks over prop driven customization.

bmartel avatar Jan 21 '24 16:01 bmartel

In the latest published release you will be able to pass this in through listProps:

<MultiSelect  options={optionsFilter} value={selectedFilter} listProps={{emptyResultsLabel: 'Its changed'}} onChange={setSelectedFilter} />

bmartel avatar Jan 22 '24 12:01 bmartel