@choice-ui/react 1.9.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -81,11 +81,14 @@ const Command = forwardRef((props, forwardedRef) => {
|
|
|
81
81
|
if (input) input.focus();
|
|
82
82
|
else (_a = document.getElementById(listId)) == null ? void 0 : _a.focus();
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
let newSelectedId;
|
|
85
|
+
for (const [itemId, data] of ids.current.entries()) {
|
|
86
|
+
if (data.value === value2) {
|
|
87
|
+
newSelectedId = itemId;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
state.current.selectedItemId = newSelectedId;
|
|
89
92
|
if (!opts) {
|
|
90
93
|
schedule(5, scrollSelectedIntoView);
|
|
91
94
|
}
|
|
@@ -79,6 +79,7 @@ const CommandItem = memo(
|
|
|
79
79
|
const hasValidShortcut = shortcut && (shortcut.modifier || shortcut.keys);
|
|
80
80
|
const handlePointerMove = useEventCallback(() => {
|
|
81
81
|
if (disabled || context.getDisablePointerSelection()) return;
|
|
82
|
+
if (context.store.snapshot().value === valueRef.current) return;
|
|
82
83
|
select();
|
|
83
84
|
});
|
|
84
85
|
const handleClick = useEventCallback(() => {
|
package/package.json
CHANGED