fix(SelectMenu): fixes non-strings and nested searchable attributes (#967)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Italo
2023-11-21 18:20:48 -03:00
committed by GitHub
parent 73d0fa7273
commit 37fdf224c0
3 changed files with 53 additions and 2 deletions

View File

@@ -99,6 +99,20 @@ props:
---
::
#### Search Attributes
Use the `search-attributes` with an array of property names to search on each option object.
Nested attributes can be accessed using `dot.notation`. When the property value is an array or object, these are cast to string so these can be searched within.
::component-example
---
component: 'select-menu-example-search-attributes'
componentProps:
class: 'w-full lg:w-96'
---
::
#### Clear on close :u-badge{label="New" class="align-middle ml-2 !rounded-full" variant="subtle"}
By default, the search query will be kept after the menu is closed. To clear it on close, set the `clear-search-on-close` prop.