mantine icon indicating copy to clipboard operation
mantine copied to clipboard

MultiSelect with `searchable` and `creatable` hides caret when empty and hides new query when the query already exists

Open italodeandra opened this issue 3 years ago • 6 comments
trafficstars

What package has an issue

@mantine/core

Describe the bug

Pretty much the title. Demonstration:

https://user-images.githubusercontent.com/19225266/190815311-4b6548e6-d6b2-4f9b-a08b-8aa0dbc14265.mp4

In my opinion those two issues are UX problems. But some might disagree, because I'm not sure if those two behaviors were made by design.

What version of @mantine/hooks page do you have in package.json?

5.3.2

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

No

italodeandra avatar Sep 16 '22 22:09 italodeandra

I do not understand the issues, can you provide additional information? It seems to be working as intended based on the video.

rtivital avatar Sep 17 '22 05:09 rtivital

The first issue is when I'm focused on the MultiSelect with an item already added, my caret is hidden. It should be still visible the same way it is when I type something or when there's no item added.

The second issue is that if you type the same name of a previous added item, the text you typed suddenly gets hidden.

Both issues are unusual UI behaviors and to me they feel like an UX problem since this is the first time I see this behavior on an UI library.

italodeandra avatar Sep 17 '22 13:09 italodeandra

You can configure this behavior with filter and shouldCreate props

rtivital avatar Sep 17 '22 19:09 rtivital

You can configure this behavior with filter and shouldCreate props

Sorry, I didn't get how these props can fix the issue. Can you elaborate, please?

italodeandra avatar Sep 19 '22 19:09 italodeandra

filter prop determines whether item should be displayed in the list, shouldCreate determines whether new item can be created with current search query. You can use these props to customize behavior to match your requirements.

rtivital avatar Sep 20 '22 07:09 rtivital

But the issue I mentioned happens on the search field (the query text), not in the options. You can check the video again to see better what I mean.

italodeandra avatar Sep 20 '22 11:09 italodeandra

+1

snehilvj avatar Oct 06 '22 18:10 snehilvj

Haven’t faced this issue once I upgraded to latest mantine.

snehilvj avatar Oct 11 '22 00:10 snehilvj

@italodeandra please update the latest version and see if the issue was resolved

rtivital avatar Oct 11 '22 04:10 rtivital

Yes. It was fixed. Thanks!

italodeandra avatar Oct 11 '22 13:10 italodeandra