]> git.localhorst.tv Git - alttp.git/commitdiff
searchable full name
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 29 May 2025 16:15:16 +0000 (18:15 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 29 May 2025 16:15:16 +0000 (18:15 +0200)
resources/js/components/zootr/MixedPoolsTracker.js

index 3a87df335b40009707bf17df0bee52c8f509de4d..071f0dd24283b5f4c37f0f341ace57962292a818 100644 (file)
@@ -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) => {