@choice-ui/command 0.0.7 → 0.0.9
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.
- package/dist/index.js +9 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -640,10 +640,14 @@ var Command = forwardRef((props, forwardedRef) => {
|
|
|
640
640
|
if (input) input.focus();
|
|
641
641
|
else document.getElementById(listId)?.focus();
|
|
642
642
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
643
|
+
let newSelectedId;
|
|
644
|
+
for (const [itemId, data] of ids.current.entries()) {
|
|
645
|
+
if (data.value === value2) {
|
|
646
|
+
newSelectedId = itemId;
|
|
647
|
+
break;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
state.current.selectedItemId = newSelectedId;
|
|
647
651
|
if (!opts) {
|
|
648
652
|
schedule(5, scrollSelectedIntoView);
|
|
649
653
|
}
|
|
@@ -1119,6 +1123,7 @@ var CommandItem = memo(
|
|
|
1119
1123
|
const hasValidShortcut = shortcut && (shortcut.modifier || shortcut.keys);
|
|
1120
1124
|
const handlePointerMove = useEventCallback(() => {
|
|
1121
1125
|
if (disabled || context.getDisablePointerSelection()) return;
|
|
1126
|
+
if (context.store.snapshot().value === valueRef.current) return;
|
|
1122
1127
|
select();
|
|
1123
1128
|
});
|
|
1124
1129
|
const handleClick = useEventCallback(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@choice-ui/command",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "A command palette component for quick actions, search, and keyboard navigation",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@choice-ui/shared": "^0.0.1",
|
|
24
24
|
"@choice-ui/text-field": "^0.0.10",
|
|
25
25
|
"@choice-ui/kbd": "^0.0.4",
|
|
26
|
-
"@choice-ui/scroll-area": "^0.0.
|
|
26
|
+
"@choice-ui/scroll-area": "^0.0.8",
|
|
27
27
|
"@choice-ui/tabs": "^0.0.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|