primereact 10.4.0 → 10.5.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.
- package/calendar/calendar.cjs.js +12 -4
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +12 -4
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +12 -4
- package/calendar/calendar.min.js +1 -1
- package/checkbox/checkbox.cjs.js +2 -0
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +2 -0
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +2 -0
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +109 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +109 -20
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +109 -20
- package/chips/chips.min.js +1 -1
- package/core/core.js +643 -465
- package/core/core.min.js +4 -4
- package/dropdown/dropdown.cjs.js +313 -141
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +313 -141
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +313 -141
- package/dropdown/dropdown.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +21 -17
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +21 -17
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +21 -17
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +3 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +3 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +3 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/knob/knob.cjs.js +62 -0
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +62 -0
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +62 -0
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +362 -92
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +363 -93
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +362 -92
- package/listbox/listbox.min.js +1 -1
- package/menu/menu.cjs.js +4 -2
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +4 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +5 -4
- package/menu/menu.min.js +1 -1
- package/multiselect/multiselect.cjs.js +377 -107
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +377 -107
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +377 -107
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +251 -251
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +258 -258
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +251 -251
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +2 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +2 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +3 -3
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +3 -2
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +3 -2
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +3 -2
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +22 -20
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +22 -20
- package/password/password.esm.min.js +1 -1
- package/password/password.js +22 -20
- package/password/password.min.js +1 -1
- package/primereact.all.cjs.js +1473 -485
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1473 -485
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1473 -485
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +1 -0
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +1 -0
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +1 -0
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +103 -4
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +103 -4
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +103 -4
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +328 -67
- package/resources/themes/arya-green/theme.css +328 -67
- package/resources/themes/arya-orange/theme.css +328 -67
- package/resources/themes/arya-purple/theme.css +26 -6
- package/resources/themes/bootstrap4-dark-blue/theme.css +328 -67
- package/resources/themes/bootstrap4-dark-purple/theme.css +26 -6
- package/resources/themes/bootstrap4-light-blue/theme.css +328 -67
- package/resources/themes/bootstrap4-light-purple/theme.css +26 -6
- package/resources/themes/fluent-light/theme.css +327 -66
- package/resources/themes/lara-dark-amber/theme.css +328 -67
- package/resources/themes/lara-dark-blue/theme.css +328 -67
- package/resources/themes/lara-dark-cyan/theme.css +328 -67
- package/resources/themes/lara-dark-green/theme.css +328 -67
- package/resources/themes/lara-dark-indigo/theme.css +328 -67
- package/resources/themes/lara-dark-pink/theme.css +328 -67
- package/resources/themes/lara-dark-purple/theme.css +26 -6
- package/resources/themes/lara-dark-teal/theme.css +328 -67
- package/resources/themes/lara-light-amber/theme.css +328 -67
- package/resources/themes/lara-light-blue/theme.css +328 -67
- package/resources/themes/lara-light-cyan/theme.css +328 -67
- package/resources/themes/lara-light-green/theme.css +328 -67
- package/resources/themes/lara-light-indigo/theme.css +328 -67
- package/resources/themes/lara-light-pink/theme.css +328 -67
- package/resources/themes/lara-light-purple/theme.css +26 -6
- package/resources/themes/lara-light-teal/theme.css +328 -67
- package/resources/themes/luna-amber/theme.css +328 -67
- package/resources/themes/luna-blue/theme.css +328 -67
- package/resources/themes/luna-green/theme.css +328 -67
- package/resources/themes/luna-pink/theme.css +328 -67
- package/resources/themes/md-dark-deeppurple/theme.css +158 -138
- package/resources/themes/md-dark-indigo/theme.css +454 -193
- package/resources/themes/md-light-deeppurple/theme.css +26 -6
- package/resources/themes/md-light-indigo/theme.css +328 -67
- package/resources/themes/mdc-dark-deeppurple/theme.css +158 -138
- package/resources/themes/mdc-dark-indigo/theme.css +454 -193
- package/resources/themes/mdc-light-deeppurple/theme.css +26 -6
- package/resources/themes/mdc-light-indigo/theme.css +328 -67
- package/resources/themes/mira/theme.css +328 -67
- package/resources/themes/nano/theme.css +328 -67
- package/resources/themes/nova/theme.css +328 -67
- package/resources/themes/nova-accent/theme.css +328 -67
- package/resources/themes/nova-alt/theme.css +328 -67
- package/resources/themes/rhea/theme.css +328 -67
- package/resources/themes/saga-blue/theme.css +328 -67
- package/resources/themes/saga-green/theme.css +328 -67
- package/resources/themes/saga-orange/theme.css +328 -67
- package/resources/themes/saga-purple/theme.css +26 -6
- package/resources/themes/soho-dark/theme.css +353 -92
- package/resources/themes/soho-light/theme.css +328 -67
- package/resources/themes/tailwind-light/theme.css +329 -71
- package/resources/themes/vela-blue/theme.css +328 -67
- package/resources/themes/vela-green/theme.css +328 -67
- package/resources/themes/vela-orange/theme.css +328 -67
- package/resources/themes/vela-purple/theme.css +26 -6
- package/resources/themes/viva-dark/theme.css +328 -67
- package/resources/themes/viva-light/theme.css +328 -67
- package/selectbutton/selectbutton.cjs.js +96 -50
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +96 -50
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +96 -50
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/slider.cjs.js +25 -4
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +25 -4
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +25 -4
- package/slider/slider.min.js +1 -1
- package/splitter/splitter.cjs.js +16 -15
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +16 -15
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +16 -15
- package/splitter/splitter.min.js +1 -1
- package/tabview/tabview.cjs.js +6 -5
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +39 -34
- package/tabview/tabview.esm.js +6 -5
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +6 -5
- package/tabview/tabview.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +15 -14
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +14 -13
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +15 -14
- package/togglebutton/togglebutton.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +3 -2
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +3 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +3 -2
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/web-types.json +1 -1
package/dropdown/dropdown.esm.js
CHANGED
|
@@ -181,10 +181,13 @@ var classes = {
|
|
|
181
181
|
item: function item(_ref7) {
|
|
182
182
|
var selected = _ref7.selected,
|
|
183
183
|
disabled = _ref7.disabled,
|
|
184
|
-
label = _ref7.label
|
|
184
|
+
label = _ref7.label,
|
|
185
|
+
index = _ref7.index,
|
|
186
|
+
focusedOptionIndex = _ref7.focusedOptionIndex;
|
|
185
187
|
return classNames('p-dropdown-item', {
|
|
186
188
|
'p-highlight': selected,
|
|
187
189
|
'p-disabled': disabled,
|
|
190
|
+
'p-focus': index === focusedOptionIndex,
|
|
188
191
|
'p-dropdown-item-empty': !label || label.length === 0
|
|
189
192
|
});
|
|
190
193
|
},
|
|
@@ -251,6 +254,8 @@ var DropdownBase = ComponentBase.extend({
|
|
|
251
254
|
onShow: null,
|
|
252
255
|
optionDisabled: null,
|
|
253
256
|
optionGroupChildren: 'items',
|
|
257
|
+
selectOnFocus: false,
|
|
258
|
+
autoOptionFocus: false,
|
|
254
259
|
optionGroupLabel: null,
|
|
255
260
|
optionGroupTemplate: null,
|
|
256
261
|
optionLabel: null,
|
|
@@ -289,7 +294,9 @@ var DropdownItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
289
294
|
selected = props.selected,
|
|
290
295
|
disabled = props.disabled,
|
|
291
296
|
option = props.option,
|
|
292
|
-
label = props.label
|
|
297
|
+
label = props.label,
|
|
298
|
+
index = props.index,
|
|
299
|
+
focusedOptionIndex = props.focusedOptionIndex;
|
|
293
300
|
var getPTOptions = function getPTOptions(key) {
|
|
294
301
|
return ptm(key, {
|
|
295
302
|
context: {
|
|
@@ -298,7 +305,7 @@ var DropdownItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
298
305
|
}
|
|
299
306
|
});
|
|
300
307
|
};
|
|
301
|
-
var _onClick = function onClick(event) {
|
|
308
|
+
var _onClick = function onClick(event, i) {
|
|
302
309
|
if (props.onClick) {
|
|
303
310
|
props.onClick({
|
|
304
311
|
originalEvent: event,
|
|
@@ -313,7 +320,9 @@ var DropdownItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
313
320
|
className: classNames(option.className, cx('item', {
|
|
314
321
|
selected: selected,
|
|
315
322
|
disabled: disabled,
|
|
316
|
-
label: label
|
|
323
|
+
label: label,
|
|
324
|
+
index: index,
|
|
325
|
+
focusedOptionIndex: focusedOptionIndex
|
|
317
326
|
})),
|
|
318
327
|
style: props.style,
|
|
319
328
|
onClick: function onClick(e) {
|
|
@@ -322,6 +331,7 @@ var DropdownItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
322
331
|
'aria-label': label,
|
|
323
332
|
'aria-selected': selected,
|
|
324
333
|
'data-p-highlight': selected,
|
|
334
|
+
'data-p-focused': focusedOptionIndex === index,
|
|
325
335
|
'data-p-disabled': disabled
|
|
326
336
|
}, getPTOptions('item'));
|
|
327
337
|
return /*#__PURE__*/React.createElement("li", itemProps, content, /*#__PURE__*/React.createElement(Ripple, null));
|
|
@@ -393,6 +403,8 @@ var DropdownPanel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(funct
|
|
|
393
403
|
var disabled = props.isOptionDisabled(option);
|
|
394
404
|
return /*#__PURE__*/React.createElement(DropdownItem, {
|
|
395
405
|
key: optionKey,
|
|
406
|
+
index: j,
|
|
407
|
+
focusedOptionIndex: props.focusedOptionIndex,
|
|
396
408
|
label: optionLabel,
|
|
397
409
|
option: option,
|
|
398
410
|
style: style,
|
|
@@ -440,6 +452,8 @@ var DropdownPanel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(funct
|
|
|
440
452
|
return /*#__PURE__*/React.createElement(DropdownItem, {
|
|
441
453
|
key: optionKey,
|
|
442
454
|
label: optionLabel,
|
|
455
|
+
index: index,
|
|
456
|
+
focusedOptionIndex: props.focusedOptionIndex,
|
|
443
457
|
option: option,
|
|
444
458
|
style: style,
|
|
445
459
|
template: props.itemTemplate,
|
|
@@ -632,20 +646,30 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
632
646
|
setFilterState = _React$useState2[1];
|
|
633
647
|
var _React$useState3 = React.useState(false),
|
|
634
648
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
635
|
-
|
|
636
|
-
|
|
649
|
+
clicked = _React$useState4[0],
|
|
650
|
+
setClicked = _React$useState4[1];
|
|
637
651
|
var _React$useState5 = React.useState(false),
|
|
638
652
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
639
|
-
|
|
640
|
-
|
|
653
|
+
focusedState = _React$useState6[0],
|
|
654
|
+
setFocusedState = _React$useState6[1];
|
|
655
|
+
var _React$useState7 = React.useState(null),
|
|
656
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
657
|
+
focusedOptionIndex = _React$useState8[0],
|
|
658
|
+
setFocusedOptionIndex = _React$useState8[1];
|
|
659
|
+
var _React$useState9 = React.useState(false),
|
|
660
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
661
|
+
overlayVisibleState = _React$useState10[0],
|
|
662
|
+
setOverlayVisibleState = _React$useState10[1];
|
|
641
663
|
var elementRef = React.useRef(null);
|
|
642
664
|
var overlayRef = React.useRef(null);
|
|
665
|
+
var firstHiddenFocusableElementOnOverlay = React.useRef(null);
|
|
666
|
+
var lastHiddenFocusableElementOnOverlay = React.useRef(null);
|
|
643
667
|
var inputRef = React.useRef(props.inputRef);
|
|
644
668
|
var focusInputRef = React.useRef(props.focusInputRef);
|
|
645
669
|
var virtualScrollerRef = React.useRef(null);
|
|
646
670
|
var searchTimeout = React.useRef(null);
|
|
647
671
|
var searchValue = React.useRef(null);
|
|
648
|
-
|
|
672
|
+
React.useRef(null);
|
|
649
673
|
var isLazy = props.virtualScrollerOptions && props.virtualScrollerOptions.lazy;
|
|
650
674
|
var hasFilter = ObjectUtils.isNotEmpty(filterState);
|
|
651
675
|
var appendTo = props.appendTo || context && context.appendTo || PrimeReact.appendTo;
|
|
@@ -709,6 +733,14 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
709
733
|
return props.options;
|
|
710
734
|
}
|
|
711
735
|
};
|
|
736
|
+
var onFirstHiddenFocus = function onFirstHiddenFocus(event) {
|
|
737
|
+
var focusableEl = event.relatedTarget === focusInputRef.current ? DomHandler.getFirstFocusableElement(overlayRef.current, ':not([data-p-hidden-focusable="true"])') : focusInputRef.current;
|
|
738
|
+
DomHandler.focus(focusableEl);
|
|
739
|
+
};
|
|
740
|
+
var onLastHiddenFocus = function onLastHiddenFocus(event) {
|
|
741
|
+
var focusableEl = event.relatedTarget === focusInputRef.current ? DomHandler.getLastFocusableElement(overlayRef.current, ':not([data-p-hidden-focusable="true"])') : focusInputRef.current;
|
|
742
|
+
DomHandler.focus(focusableEl);
|
|
743
|
+
};
|
|
712
744
|
var isClearClicked = function isClearClicked(event) {
|
|
713
745
|
return DomHandler.isAttributeEquals(event.target, 'data-pc-section', 'clearicon') || DomHandler.isAttributeEquals(event.target.parentElement || event.target, 'data-pc-section', 'filterclearicon');
|
|
714
746
|
};
|
|
@@ -728,6 +760,7 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
728
760
|
DomHandler.focus(focusInputRef.current);
|
|
729
761
|
overlayVisibleState ? hide() : show();
|
|
730
762
|
}
|
|
763
|
+
setClicked(true);
|
|
731
764
|
};
|
|
732
765
|
var onInputFocus = function onInputFocus(event) {
|
|
733
766
|
if (props.showOnFocus && !overlayVisibleState) {
|
|
@@ -759,6 +792,15 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
759
792
|
}, 200);
|
|
760
793
|
}
|
|
761
794
|
};
|
|
795
|
+
var onOptionSelect = function onOptionSelect(event, option) {
|
|
796
|
+
var isHide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
797
|
+
var value = getOptionValue(option);
|
|
798
|
+
selectItem({
|
|
799
|
+
originalEvent: event,
|
|
800
|
+
option: value
|
|
801
|
+
});
|
|
802
|
+
isHide && hide();
|
|
803
|
+
};
|
|
762
804
|
var onPanelClick = function onPanelClick(event) {
|
|
763
805
|
OverlayService.emit('overlay-click', {
|
|
764
806
|
originalEvent: event,
|
|
@@ -766,189 +808,285 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
766
808
|
});
|
|
767
809
|
};
|
|
768
810
|
var onInputKeyDown = function onInputKeyDown(event) {
|
|
811
|
+
if (props.disabled || DomHandler.isAndroid()) {
|
|
812
|
+
event.preventDefault();
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
769
816
|
switch (event.code) {
|
|
770
817
|
case 'ArrowDown':
|
|
771
|
-
|
|
818
|
+
onArrowDownKey(event);
|
|
772
819
|
break;
|
|
773
820
|
case 'ArrowUp':
|
|
774
|
-
|
|
821
|
+
onArrowUpKey(event);
|
|
822
|
+
break;
|
|
823
|
+
case 'ArrowLeft':
|
|
824
|
+
case 'ArrowRight':
|
|
825
|
+
onArrowLeftKey(event, props.editable);
|
|
826
|
+
break;
|
|
827
|
+
case 'Home':
|
|
828
|
+
onHomeKey(event);
|
|
829
|
+
break;
|
|
830
|
+
case 'End':
|
|
831
|
+
onEndKey(event);
|
|
832
|
+
break;
|
|
833
|
+
case 'PageDown':
|
|
834
|
+
onPageDownKey(event);
|
|
835
|
+
break;
|
|
836
|
+
case 'PageUp':
|
|
837
|
+
onPageUpKey(event);
|
|
775
838
|
break;
|
|
776
839
|
case 'Space':
|
|
840
|
+
onSpaceKey(event, props.editable);
|
|
841
|
+
break;
|
|
842
|
+
case 'NumpadEnter':
|
|
777
843
|
case 'Enter':
|
|
778
|
-
|
|
779
|
-
event.preventDefault();
|
|
844
|
+
onEnterKey(event);
|
|
780
845
|
break;
|
|
781
846
|
case 'Escape':
|
|
847
|
+
onEscapeKey(event);
|
|
848
|
+
break;
|
|
782
849
|
case 'Tab':
|
|
783
|
-
|
|
850
|
+
onTabKey(event);
|
|
851
|
+
break;
|
|
852
|
+
case 'Backspace':
|
|
853
|
+
onBackspaceKey(event, props.editable);
|
|
854
|
+
break;
|
|
855
|
+
case 'ShiftLeft':
|
|
856
|
+
case 'ShiftRight':
|
|
857
|
+
//NOOP
|
|
784
858
|
break;
|
|
785
859
|
default:
|
|
786
|
-
|
|
860
|
+
if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) {
|
|
861
|
+
!overlayVisibleState && show();
|
|
862
|
+
!props.editable && searchOptions(event, event.key);
|
|
863
|
+
}
|
|
787
864
|
break;
|
|
788
865
|
}
|
|
866
|
+
setClicked(false);
|
|
789
867
|
};
|
|
790
868
|
var onFilterInputKeyDown = function onFilterInputKeyDown(event) {
|
|
791
869
|
switch (event.code) {
|
|
792
870
|
case 'ArrowDown':
|
|
793
|
-
|
|
871
|
+
onArrowDownKey(event);
|
|
794
872
|
break;
|
|
795
873
|
case 'ArrowUp':
|
|
796
|
-
|
|
874
|
+
onArrowUpKey(event);
|
|
875
|
+
break;
|
|
876
|
+
case 'ArrowLeft':
|
|
877
|
+
case 'ArrowRight':
|
|
878
|
+
onArrowLeftKey(event, true);
|
|
797
879
|
break;
|
|
798
880
|
case 'Escape':
|
|
799
881
|
case 'Enter':
|
|
800
|
-
|
|
882
|
+
onEnterKey(event);
|
|
801
883
|
event.preventDefault();
|
|
802
884
|
break;
|
|
803
885
|
}
|
|
804
886
|
};
|
|
805
|
-
var
|
|
806
|
-
|
|
807
|
-
var prevOption = findPrevOption(getSelectedOptionIndex());
|
|
808
|
-
if (prevOption) {
|
|
809
|
-
selectItem({
|
|
810
|
-
originalEvent: event,
|
|
811
|
-
option: prevOption
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
event.preventDefault();
|
|
887
|
+
var hasFocusableElements = function hasFocusableElements() {
|
|
888
|
+
return DomHandler.getFocusableElements(overlayRef.current, ':not([data-p-hidden-focusable="true"])').length > 0;
|
|
816
889
|
};
|
|
817
|
-
var
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
show();
|
|
821
|
-
} else {
|
|
822
|
-
var nextOption = findNextOption(getSelectedOptionIndex());
|
|
823
|
-
if (nextOption) {
|
|
824
|
-
selectItem({
|
|
825
|
-
originalEvent: event,
|
|
826
|
-
option: nextOption
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
event.preventDefault();
|
|
890
|
+
var isOptionMatched = function isOptionMatched(option) {
|
|
891
|
+
var _getOptionLabel;
|
|
892
|
+
return isValidOption(option) && ((_getOptionLabel = getOptionLabel(option)) === null || _getOptionLabel === void 0 ? void 0 : _getOptionLabel.toLocaleLowerCase(props.filterLocale).startsWith(searchValue.current.toLocaleLowerCase(props.filterLocale)));
|
|
832
893
|
};
|
|
833
|
-
var
|
|
834
|
-
|
|
835
|
-
var groupIndex = index === -1 ? 0 : index.group;
|
|
836
|
-
var optionIndex = index === -1 ? -1 : index.option;
|
|
837
|
-
var option = findNextOptionInList(getOptionGroupChildren(visibleOptions[groupIndex]), optionIndex);
|
|
838
|
-
if (option) return option;else if (groupIndex + 1 !== visibleOptions.length) return findNextOption({
|
|
839
|
-
group: groupIndex + 1,
|
|
840
|
-
option: -1
|
|
841
|
-
});else return null;
|
|
842
|
-
}
|
|
843
|
-
return findNextOptionInList(visibleOptions, index);
|
|
894
|
+
var isValidOption = function isValidOption(option) {
|
|
895
|
+
return ObjectUtils.isNotEmpty(option) && !(isOptionDisabled(option) || isOptionGroup(option));
|
|
844
896
|
};
|
|
845
|
-
var
|
|
846
|
-
|
|
847
|
-
if (i === list.length) {
|
|
848
|
-
return null;
|
|
849
|
-
}
|
|
850
|
-
var option = list[i];
|
|
851
|
-
return isOptionDisabled(option) ? findNextOptionInList(i) : option;
|
|
897
|
+
var hasSelectedOption = function hasSelectedOption() {
|
|
898
|
+
return ObjectUtils.isNotEmpty(props.value);
|
|
852
899
|
};
|
|
853
|
-
var
|
|
854
|
-
|
|
855
|
-
return null;
|
|
856
|
-
}
|
|
857
|
-
if (props.optionGroupLabel) {
|
|
858
|
-
var groupIndex = index.group;
|
|
859
|
-
var optionIndex = index.option;
|
|
860
|
-
var option = findPrevOptionInList(getOptionGroupChildren(visibleOptions[groupIndex]), optionIndex);
|
|
861
|
-
if (option) return option;else if (groupIndex > 0) return findPrevOption({
|
|
862
|
-
group: groupIndex - 1,
|
|
863
|
-
option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length
|
|
864
|
-
});else return null;
|
|
865
|
-
}
|
|
866
|
-
return findPrevOptionInList(visibleOptions, index);
|
|
900
|
+
var isValidSelectedOption = function isValidSelectedOption(option) {
|
|
901
|
+
return isValidOption(option) && isSelected(option);
|
|
867
902
|
};
|
|
868
|
-
var
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
}
|
|
873
|
-
var option = list[i];
|
|
874
|
-
return isOptionDisabled(option) ? findPrevOption(i) : option;
|
|
903
|
+
var findSelectedOptionIndex = function findSelectedOptionIndex() {
|
|
904
|
+
return hasSelectedOption ? visibleOptions.findIndex(function (option) {
|
|
905
|
+
return isValidSelectedOption(option);
|
|
906
|
+
}) : -1;
|
|
875
907
|
};
|
|
876
|
-
var
|
|
908
|
+
var findFirstFocusedOptionIndex = function findFirstFocusedOptionIndex() {
|
|
909
|
+
var selectedIndex = findSelectedOptionIndex();
|
|
910
|
+
return selectedIndex < 0 ? findFirstOptionIndex() : selectedIndex;
|
|
911
|
+
};
|
|
912
|
+
var searchOptions = function searchOptions(event, _char) {
|
|
913
|
+
searchValue.current = (searchValue.current || '') + _char;
|
|
914
|
+
var optionIndex = -1;
|
|
915
|
+
var matched = false;
|
|
916
|
+
if (ObjectUtils.isNotEmpty(searchValue.current)) {
|
|
917
|
+
if (focusedOptionIndex !== -1) {
|
|
918
|
+
optionIndex = visibleOptions.slice(focusedOptionIndex).findIndex(function (option) {
|
|
919
|
+
return isOptionMatched(option);
|
|
920
|
+
});
|
|
921
|
+
optionIndex = optionIndex === -1 ? visibleOptions.slice(0, focusedOptionIndex).findIndex(function (option) {
|
|
922
|
+
return isOptionMatched(option);
|
|
923
|
+
}) : optionIndex + focusedOptionIndex;
|
|
924
|
+
} else {
|
|
925
|
+
optionIndex = visibleOptions.findIndex(function (option) {
|
|
926
|
+
return isOptionMatched(option);
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
if (optionIndex !== -1) {
|
|
930
|
+
matched = true;
|
|
931
|
+
}
|
|
932
|
+
if (optionIndex === -1 && focusedOptionIndex === -1) {
|
|
933
|
+
optionIndex = findFirstFocusedOptionIndex();
|
|
934
|
+
}
|
|
935
|
+
if (optionIndex !== -1) {
|
|
936
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
877
939
|
if (searchTimeout.current) {
|
|
878
940
|
clearTimeout(searchTimeout.current);
|
|
879
941
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
942
|
+
searchTimeout.current = setTimeout(function () {
|
|
943
|
+
searchValue.current = '';
|
|
944
|
+
searchTimeout.current = null;
|
|
945
|
+
}, 500);
|
|
946
|
+
return matched;
|
|
947
|
+
};
|
|
948
|
+
var findLastFocusedOptionIndex = function findLastFocusedOptionIndex() {
|
|
949
|
+
var selectedIndex = findSelectedOptionIndex();
|
|
950
|
+
return selectedIndex < 0 ? findLastOptionIndex() : selectedIndex;
|
|
951
|
+
};
|
|
952
|
+
var findFirstOptionIndex = function findFirstOptionIndex() {
|
|
953
|
+
return visibleOptions.findIndex(function (option) {
|
|
954
|
+
return isValidOption(option);
|
|
955
|
+
});
|
|
956
|
+
};
|
|
957
|
+
var findLastOptionIndex = function findLastOptionIndex() {
|
|
958
|
+
return ObjectUtils.findLastIndex(visibleOptions, function (option) {
|
|
959
|
+
return isValidOption(option);
|
|
960
|
+
});
|
|
961
|
+
};
|
|
962
|
+
var findNextOptionIndex = function findNextOptionIndex(index) {
|
|
963
|
+
var matchedOptionIndex = index < visibleOptions.length - 1 ? visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
964
|
+
return isValidOption(option);
|
|
965
|
+
}) : -1;
|
|
966
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
967
|
+
};
|
|
968
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index) {
|
|
969
|
+
var matchedOptionIndex = index > 0 ? ObjectUtils.findLastIndex(visibleOptions.slice(0, index), function (option) {
|
|
970
|
+
return isValidOption(option);
|
|
971
|
+
}) : -1;
|
|
972
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
973
|
+
};
|
|
974
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(event, index) {
|
|
975
|
+
if (focusedOptionIndex !== index) {
|
|
976
|
+
setFocusedOptionIndex(index);
|
|
977
|
+
if (props.selectOnFocus) {
|
|
978
|
+
onOptionSelect(event, visibleOptions[index], false);
|
|
979
|
+
}
|
|
883
980
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
981
|
+
};
|
|
982
|
+
var onArrowDownKey = function onArrowDownKey(event) {
|
|
983
|
+
if (!overlayVisibleState) {
|
|
984
|
+
show();
|
|
985
|
+
props.editable && changeFocusedOptionIndex(event, findSelectedOptionIndex());
|
|
986
|
+
} else {
|
|
987
|
+
var optionIndex = focusedOptionIndex !== -1 ? findNextOptionIndex(focusedOptionIndex) : clicked ? findFirstOptionIndex() : findFirstFocusedOptionIndex();
|
|
988
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
888
989
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
if (
|
|
895
|
-
|
|
896
|
-
originalEvent: event,
|
|
897
|
-
option: newOption
|
|
898
|
-
});
|
|
990
|
+
event.preventDefault();
|
|
991
|
+
};
|
|
992
|
+
var onArrowUpKey = function onArrowUpKey(event) {
|
|
993
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
994
|
+
if (event.altKey && !pressedInInputText) {
|
|
995
|
+
if (focusedOptionIndex !== -1) {
|
|
996
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
899
997
|
}
|
|
998
|
+
state.overlayVisible && hide();
|
|
999
|
+
event.preventDefault();
|
|
1000
|
+
} else {
|
|
1001
|
+
var optionIndex = focusedOptionIndex !== -1 ? findPrevOptionIndex(focusedOptionIndex) : clicked ? findLastOptionIndex() : findLastFocusedOptionIndex();
|
|
1002
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
1003
|
+
!overlayVisibleState && show();
|
|
1004
|
+
event.preventDefault();
|
|
900
1005
|
}
|
|
901
|
-
searchTimeout.current = setTimeout(function () {
|
|
902
|
-
searchValue.current = null;
|
|
903
|
-
}, 250);
|
|
904
1006
|
};
|
|
905
|
-
var
|
|
906
|
-
|
|
907
|
-
|
|
1007
|
+
var onArrowLeftKey = function onArrowLeftKey(event) {
|
|
1008
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1009
|
+
pressedInInputText && setFocusedOptionIndex(-1);
|
|
1010
|
+
};
|
|
1011
|
+
var onHomeKey = function onHomeKey(event) {
|
|
1012
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1013
|
+
if (pressedInInputText) {
|
|
1014
|
+
event.currentTarget.setSelectionRange(0, 0);
|
|
1015
|
+
setFocusedOptionIndex(-1);
|
|
1016
|
+
} else {
|
|
1017
|
+
changeFocusedOptionIndex(event, findFirstOptionIndex());
|
|
1018
|
+
!overlayVisibleState && show();
|
|
908
1019
|
}
|
|
909
|
-
|
|
1020
|
+
event.preventDefault();
|
|
910
1021
|
};
|
|
911
|
-
var
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
1022
|
+
var onEndKey = function onEndKey(event) {
|
|
1023
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1024
|
+
if (pressedInInputText) {
|
|
1025
|
+
var target = event.currentTarget;
|
|
1026
|
+
var len = target.value.length;
|
|
1027
|
+
target.setSelectionRange(len, len);
|
|
1028
|
+
setFocusedOptionIndex(-1);
|
|
1029
|
+
} else {
|
|
1030
|
+
changeFocusedOptionIndex(event, findLastOptionIndex());
|
|
1031
|
+
!overlayVisibleState && show();
|
|
917
1032
|
}
|
|
918
|
-
|
|
1033
|
+
event.preventDefault();
|
|
919
1034
|
};
|
|
920
|
-
var
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1035
|
+
var onPageUpKey = function onPageUpKey(event) {
|
|
1036
|
+
event.preventDefault();
|
|
1037
|
+
};
|
|
1038
|
+
var onPageDownKey = function onPageDownKey(event) {
|
|
1039
|
+
event.preventDefault();
|
|
1040
|
+
};
|
|
1041
|
+
var onSpaceKey = function onSpaceKey(event) {
|
|
1042
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1043
|
+
!pressedInInputText && onEnterKey(event);
|
|
1044
|
+
};
|
|
1045
|
+
var onEnterKey = function onEnterKey(event) {
|
|
1046
|
+
if (!overlayVisibleState) {
|
|
1047
|
+
setFocusedOptionIndex(-1);
|
|
1048
|
+
onArrowDownKey(event);
|
|
1049
|
+
} else {
|
|
1050
|
+
if (focusedOptionIndex !== -1) {
|
|
1051
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
931
1052
|
}
|
|
1053
|
+
hide();
|
|
932
1054
|
}
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
1055
|
+
event.preventDefault();
|
|
1056
|
+
};
|
|
1057
|
+
var onEscapeKey = function onEscapeKey(event) {
|
|
1058
|
+
overlayVisibleState && hide();
|
|
1059
|
+
event.preventDefault();
|
|
1060
|
+
};
|
|
1061
|
+
var onTabKey = function onTabKey(event) {
|
|
1062
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1063
|
+
if (!pressedInInputText) {
|
|
1064
|
+
if (overlayVisibleState && hasFocusableElements()) {
|
|
1065
|
+
DomHandler.focus($refs.firstHiddenFocusableElementOnOverlay);
|
|
1066
|
+
event.preventDefault();
|
|
1067
|
+
} else {
|
|
1068
|
+
if (focusedOptionIndex !== -1) {
|
|
1069
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
938
1070
|
}
|
|
1071
|
+
overlayVisibleState && hide();
|
|
939
1072
|
}
|
|
940
1073
|
}
|
|
941
|
-
return null;
|
|
942
1074
|
};
|
|
943
|
-
var
|
|
944
|
-
var
|
|
945
|
-
if (
|
|
946
|
-
|
|
1075
|
+
var onBackspaceKey = function onBackspaceKey(event) {
|
|
1076
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1077
|
+
if (pressedInInputText) {
|
|
1078
|
+
!overlayVisibleState && show();
|
|
947
1079
|
}
|
|
948
|
-
label = label.toLocaleLowerCase(props.filterLocale);
|
|
949
|
-
return label.startsWith(searchValue.current.toLocaleLowerCase(props.filterLocale));
|
|
950
1080
|
};
|
|
951
1081
|
var onEditableInputChange = function onEditableInputChange(event) {
|
|
1082
|
+
!overlayVisibleState && show();
|
|
1083
|
+
var searchIndex = null;
|
|
1084
|
+
if (event.target.value) {
|
|
1085
|
+
searchIndex = visibleOptions.findIndex(function (item) {
|
|
1086
|
+
return item.name.toLocaleLowerCase().startsWith(event.target.value.toLocaleLowerCase());
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
setFocusedOptionIndex(searchIndex);
|
|
952
1090
|
if (props.onChange) {
|
|
953
1091
|
props.onChange({
|
|
954
1092
|
originalEvent: event.originalEvent,
|
|
@@ -1078,10 +1216,17 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1078
1216
|
return ObjectUtils.equals(props.value, getOptionValue(option), equalityKey());
|
|
1079
1217
|
};
|
|
1080
1218
|
var show = function show() {
|
|
1219
|
+
setFocusedOptionIndex(focusedOptionIndex !== -1 ? focusedOptionIndex : props.autoOptionFocus ? findFirstFocusedOptionIndex() : props.editable ? -1 : findSelectedOptionIndex());
|
|
1081
1220
|
setOverlayVisibleState(true);
|
|
1082
1221
|
};
|
|
1083
1222
|
var hide = function hide() {
|
|
1084
1223
|
setOverlayVisibleState(false);
|
|
1224
|
+
setClicked(false);
|
|
1225
|
+
};
|
|
1226
|
+
var onFocus = function onFocus() {
|
|
1227
|
+
if (props.editable) {
|
|
1228
|
+
DomHandler.focus(inputRef.current);
|
|
1229
|
+
}
|
|
1085
1230
|
};
|
|
1086
1231
|
var onOverlayEnter = function onOverlayEnter(callback) {
|
|
1087
1232
|
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
@@ -1134,6 +1279,9 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1134
1279
|
var getOptionRenderKey = function getOptionRenderKey(option) {
|
|
1135
1280
|
return props.dataKey ? ObjectUtils.resolveFieldData(option, props.dataKey) : getOptionLabel(option);
|
|
1136
1281
|
};
|
|
1282
|
+
var isOptionGroup = function isOptionGroup(option) {
|
|
1283
|
+
return props.optionGroupLabel && option.optionGroup && option.group;
|
|
1284
|
+
};
|
|
1137
1285
|
var isOptionDisabled = function isOptionDisabled(option) {
|
|
1138
1286
|
if (props.optionDisabled) {
|
|
1139
1287
|
return ObjectUtils.isFunction(props.optionDisabled) ? props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, props.optionDisabled);
|
|
@@ -1282,8 +1430,9 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1282
1430
|
maxLength: props.maxLength,
|
|
1283
1431
|
onInput: onEditableInputChange,
|
|
1284
1432
|
onFocus: onEditableInputFocus,
|
|
1433
|
+
onKeyDown: onInputKeyDown,
|
|
1285
1434
|
onBlur: onInputBlur,
|
|
1286
|
-
tabIndex: props.tabIndex
|
|
1435
|
+
tabIndex: !props.disabled ? props.tabIndex : -1,
|
|
1287
1436
|
'aria-haspopup': 'listbox'
|
|
1288
1437
|
}, ariaProps), ptm('input'));
|
|
1289
1438
|
return /*#__PURE__*/React.createElement("input", inputProps);
|
|
@@ -1375,10 +1524,31 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1375
1524
|
},
|
|
1376
1525
|
onMouseDown: props.onMouseDown,
|
|
1377
1526
|
onContextMenu: props.onContextMenu,
|
|
1527
|
+
onFocus: onFocus,
|
|
1378
1528
|
'data-p-disabled': props.disabled,
|
|
1379
1529
|
'data-p-focus': focusedState
|
|
1380
1530
|
}, otherProps, ptm('root'));
|
|
1381
|
-
|
|
1531
|
+
var firstHiddenFocusableElementProps = mergeProps({
|
|
1532
|
+
ref: firstHiddenFocusableElementOnOverlay,
|
|
1533
|
+
role: 'presentation',
|
|
1534
|
+
'aria-hidden': 'true',
|
|
1535
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
1536
|
+
tabIndex: '0',
|
|
1537
|
+
onFocus: onFirstHiddenFocus,
|
|
1538
|
+
'data-p-hidden-accessible': true,
|
|
1539
|
+
'data-p-hidden-focusable': true
|
|
1540
|
+
}, ptm('hiddenFirstFocusableEl'));
|
|
1541
|
+
var lastHiddenFocusableElementProps = mergeProps({
|
|
1542
|
+
ref: lastHiddenFocusableElementOnOverlay,
|
|
1543
|
+
role: 'presentation',
|
|
1544
|
+
'aria-hidden': 'true',
|
|
1545
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
1546
|
+
tabIndex: '0',
|
|
1547
|
+
onFocus: onLastHiddenFocus,
|
|
1548
|
+
'data-p-hidden-accessible': true,
|
|
1549
|
+
'data-p-hidden-focusable': true
|
|
1550
|
+
}, ptm('hiddenLastFocusableEl'));
|
|
1551
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, keyboardHelper, hiddenSelect, labelElement, clearIcon, dropdownIcon, /*#__PURE__*/React.createElement("span", firstHiddenFocusableElementProps), /*#__PURE__*/React.createElement(DropdownPanel, _extends({
|
|
1382
1552
|
hostName: "Dropdown",
|
|
1383
1553
|
ref: overlayRef,
|
|
1384
1554
|
visibleOptions: visibleOptions,
|
|
@@ -1387,6 +1557,8 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1387
1557
|
appendTo: appendTo,
|
|
1388
1558
|
onClick: onPanelClick,
|
|
1389
1559
|
onOptionClick: onOptionClick,
|
|
1560
|
+
focusedOptionIndex: focusedOptionIndex,
|
|
1561
|
+
setFocusedOptionIndex: setFocusedOptionIndex,
|
|
1390
1562
|
filterValue: filterState,
|
|
1391
1563
|
hasFilter: hasFilter,
|
|
1392
1564
|
onFilterClearIconClick: onFilterClearIconClick,
|
|
@@ -1409,7 +1581,7 @@ var Dropdown = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
1409
1581
|
ptm: ptm,
|
|
1410
1582
|
cx: cx,
|
|
1411
1583
|
sx: sx
|
|
1412
|
-
}))), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
1584
|
+
})), /*#__PURE__*/React.createElement("span", lastHiddenFocusableElementProps)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
1413
1585
|
target: elementRef,
|
|
1414
1586
|
content: props.tooltip
|
|
1415
1587
|
}, props.tooltipOptions, {
|