mirror of
https://github.com/directus/directus.git
synced 2026-01-24 11:37:57 -05:00
Fix searching custom value and text property on v-select (#15148)
This commit is contained in:
@@ -302,9 +302,11 @@ export default defineComponent({
|
||||
: isMatchingCurrentItem(item, searchValue);
|
||||
|
||||
function isMatchingCurrentItem(item: Record<string, any>, searchValue: string): boolean {
|
||||
const text = get(item, props.itemText);
|
||||
const value = get(item, props.itemValue);
|
||||
return (
|
||||
(item.text ? String(item.text).toLowerCase().includes(searchValue) : false) ||
|
||||
(item.value ? String(item.value).toLowerCase().includes(searchValue) : false)
|
||||
(text ? String(text).toLowerCase().includes(searchValue) : false) ||
|
||||
(value ? String(value).toLowerCase().includes(searchValue) : false)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user