From: Daniel Karbach Date: Thu, 29 May 2025 16:15:16 +0000 (+0200) Subject: searchable full name X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=fcefd54162fa814d44a015d257f4b26e342d8845;p=alttp.git searchable full name --- diff --git a/resources/js/components/zootr/MixedPoolsTracker.js b/resources/js/components/zootr/MixedPoolsTracker.js index 3a87df3..071f0dd 100644 --- a/resources/js/components/zootr/MixedPoolsTracker.js +++ b/resources/js/components/zootr/MixedPoolsTracker.js @@ -2532,7 +2532,7 @@ const SelectBox = ({ id, name, onChange, options, value }) => { const valueEntrance = React.useMemo(() => getEntrance(value) || getRoom(value), [value]); const searcher = React.useMemo(() => { - return new FuzzySearch(options, ['id', 'name', 'short'], { sort: true }); + return new FuzzySearch(options, ['id', 'name', 'short', 'fullName'], { sort: true }); }, [options]); const results = React.useMemo(() => { @@ -2889,7 +2889,10 @@ const MixedPoolsTracker = () => { options.push(getEntrance(area.id)); } }); - return options; + return options.map((option) => ({ + ...option, + fullName: entranceFull(option), + })); }, []); const isDragging = React.useCallback((entrance) => {