@deque/cauldron-react 7.1.0-canary.d4fda8b7 → 7.1.0-canary.ec0e4309
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/lib/index.js +11 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4323,6 +4323,17 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
4323
4323
|
return value === lastSelectedValue;
|
|
4324
4324
|
}) || [], 2), element = _a[0], option = _a[1];
|
|
4325
4325
|
if (autocomplete === 'manual') {
|
|
4326
|
+
// In multiselect, the listbox manages its own active option via
|
|
4327
|
+
// keyboard navigation. When the last-selected value no longer
|
|
4328
|
+
// matches any option (e.g. after deselecting the only selected
|
|
4329
|
+
// option), preserve the existing active descendant so the next
|
|
4330
|
+
// Enter keypress can re-toggle the highlighted option.
|
|
4331
|
+
if (multiselect &&
|
|
4332
|
+
!element &&
|
|
4333
|
+
activeDescendant &&
|
|
4334
|
+
matchingOptions.has(activeDescendant.element)) {
|
|
4335
|
+
return;
|
|
4336
|
+
}
|
|
4326
4337
|
setActiveDescendant(!element ? null : tslib.__assign({ element: element }, option));
|
|
4327
4338
|
}
|
|
4328
4339
|
else if (autocomplete === 'automatic' &&
|
package/package.json
CHANGED