@patternfly/react-table 4.61.8 → 4.61.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 4.61.9 (2022-01-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **Select:** Footer keyboard bugs ([#6844](https://github.com/patternfly/patternfly-react/issues/6844)) ([7f06125](https://github.com/patternfly/patternfly-react/commit/7f06125cfb52884708107da82ca3800207c9846f))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 4.61.8 (2022-01-24)
7
18
 
8
19
 
@@ -1076,6 +1076,18 @@
1076
1076
  }
1077
1077
  }
1078
1078
  }
1079
+ /** This function returns a list of tabbable items in a container
1080
+ *
1081
+ * @param {any} containerRef to the container
1082
+ * @param {string} tababbleSelectors CSS selector string of tabbable items
1083
+ */
1084
+ function findTabbableElements(containerRef, tababbleSelectors) {
1085
+ const tabbable = containerRef.current.querySelectorAll(tababbleSelectors);
1086
+ const list = Array.prototype.filter.call(tabbable, function (item) {
1087
+ return item.tabIndex >= '0';
1088
+ });
1089
+ return list;
1090
+ }
1079
1091
  /** This function is a helper for keyboard navigation through dropdowns.
1080
1092
  *
1081
1093
  * @param {number} index The index of the element you're on
@@ -4860,6 +4872,7 @@
4860
4872
  ArrowLeft: 'ArrowLeft',
4861
4873
  ArrowRight: 'ArrowRight'
4862
4874
  };
4875
+ const SelectFooterTabbableItems = 'input, button, select, textarea, a[href]';
4863
4876
 
4864
4877
  class SelectOption extends React__namespace.Component {
4865
4878
  constructor() {
@@ -4885,7 +4898,12 @@
4885
4898
  event.stopPropagation();
4886
4899
  }
4887
4900
  else {
4888
- keyHandler(index, innerIndex, 'tab');
4901
+ if (event.shiftKey) {
4902
+ keyHandler(index, innerIndex, 'up');
4903
+ }
4904
+ else {
4905
+ keyHandler(index, innerIndex, 'tab');
4906
+ }
4889
4907
  }
4890
4908
  }
4891
4909
  event.preventDefault();
@@ -5122,7 +5140,8 @@
5122
5140
  isChecked: this.checkForValue(option.props.value, checked),
5123
5141
  sendRef,
5124
5142
  keyHandler,
5125
- index: index++
5143
+ index: index++,
5144
+ isLastOptionBeforeFooter
5126
5145
  })))) : null
5127
5146
  });
5128
5147
  });
@@ -5205,26 +5224,19 @@
5205
5224
  onClose();
5206
5225
  }
5207
5226
  };
5208
- this.findTabbableFooterElements = () => {
5209
- const tabbable = this.props.footerRef.current.querySelectorAll('input, button, select, textarea, a[href]');
5210
- const list = Array.prototype.filter.call(tabbable, function (item) {
5211
- return item.tabIndex >= '0';
5212
- });
5213
- return list;
5214
- };
5215
5227
  this.handleGlobalKeys = (event) => {
5216
- const { parentRef, menuRef, hasFooter, isOpen, variant, onToggle, onClose } = this.props;
5228
+ const { parentRef, menuRef, hasFooter, footerRef, isOpen, variant, onToggle, onClose, moveFocusToLastMenuItem } = this.props;
5217
5229
  const escFromToggle = parentRef && parentRef.current && parentRef.current.contains(event.target);
5218
5230
  const escFromWithinMenu = menuRef && menuRef.current && menuRef.current.contains && menuRef.current.contains(event.target);
5219
5231
  if (isOpen &&
5220
5232
  event.key === KeyTypes.Tab &&
5221
5233
  (variant === SelectVariant.typeahead || variant === SelectVariant.typeaheadMulti)) {
5222
- this.props.handleTypeaheadKeys('tab');
5234
+ this.props.handleTypeaheadKeys('tab', event.shiftKey);
5223
5235
  event.preventDefault();
5224
5236
  return;
5225
5237
  }
5226
5238
  if (isOpen && event.key === KeyTypes.Tab && hasFooter) {
5227
- const tabbableItems = this.findTabbableFooterElements();
5239
+ const tabbableItems = findTabbableElements(footerRef, SelectFooterTabbableItems);
5228
5240
  // If no tabbable item in footer close select
5229
5241
  if (tabbableItems.length <= 0) {
5230
5242
  onToggle(false);
@@ -5233,14 +5245,30 @@
5233
5245
  return;
5234
5246
  }
5235
5247
  else {
5236
- // if current element is not in footer, tab to first tabbable element in footer
5237
- const currentElementIndex = tabbableItems.findIndex(item => item === document.activeElement);
5248
+ // if current element is not in footer, tab to first tabbable element in footer, or close if shift clicked
5249
+ const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
5238
5250
  if (currentElementIndex === -1) {
5239
- tabbableItems[0].focus();
5240
- return;
5251
+ if (event.shiftKey) {
5252
+ if (variant !== 'checkbox') {
5253
+ // only close non checkbox variation on shift clicked
5254
+ onToggle(false);
5255
+ onClose();
5256
+ this.toggle.current.focus();
5257
+ }
5258
+ }
5259
+ else {
5260
+ // tab to footer
5261
+ tabbableItems[0].focus();
5262
+ return;
5263
+ }
5241
5264
  }
5242
5265
  // Current element is in footer.
5243
5266
  if (event.shiftKey) {
5267
+ // Move focus back to menuif current tab index is 0
5268
+ if (currentElementIndex === 0) {
5269
+ moveFocusToLastMenuItem();
5270
+ event.preventDefault();
5271
+ }
5244
5272
  return;
5245
5273
  }
5246
5274
  // Tab to next element in footer or close if there are none
@@ -5314,7 +5342,7 @@
5314
5342
  }
5315
5343
  render() {
5316
5344
  /* eslint-disable @typescript-eslint/no-unused-vars */
5317
- const _a = this.props, { className, children, isOpen, isActive, isPlain, isDisabled, hasPlaceholderStyle, variant, onToggle, onEnter, onClose, onClickTypeaheadToggleButton, handleTypeaheadKeys, parentRef, menuRef, id, type, hasClearButton, 'aria-labelledby': ariaLabelledBy, 'aria-label': ariaLabel, hasFooter, footerRef } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isActive", "isPlain", "isDisabled", "hasPlaceholderStyle", "variant", "onToggle", "onEnter", "onClose", "onClickTypeaheadToggleButton", "handleTypeaheadKeys", "parentRef", "menuRef", "id", "type", "hasClearButton", 'aria-labelledby', 'aria-label', "hasFooter", "footerRef"]);
5345
+ const _a = this.props, { className, children, isOpen, isActive, isPlain, isDisabled, hasPlaceholderStyle, variant, onToggle, onEnter, onClose, onClickTypeaheadToggleButton, handleTypeaheadKeys, moveFocusToLastMenuItem, parentRef, menuRef, id, type, hasClearButton, 'aria-labelledby': ariaLabelledBy, 'aria-label': ariaLabel, hasFooter, footerRef } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isActive", "isPlain", "isDisabled", "hasPlaceholderStyle", "variant", "onToggle", "onEnter", "onClose", "onClickTypeaheadToggleButton", "handleTypeaheadKeys", "moveFocusToLastMenuItem", "parentRef", "menuRef", "id", "type", "hasClearButton", 'aria-labelledby', 'aria-label', "hasFooter", "footerRef"]);
5318
5346
  /* eslint-enable @typescript-eslint/no-unused-vars */
5319
5347
  const isTypeahead = variant === SelectVariant.typeahead || variant === SelectVariant.typeaheadMulti || hasClearButton;
5320
5348
  const toggleProps = {
@@ -5777,9 +5805,37 @@
5777
5805
  typeaheadInputValue
5778
5806
  }));
5779
5807
  };
5780
- this.handleTypeaheadKeys = (position) => {
5808
+ this.switchFocusToFavoriteMenu = () => {
5809
+ const { typeaheadCurrIndex, typeaheadStoredIndex } = this.state;
5810
+ let indexForFocus = 0;
5811
+ if (typeaheadCurrIndex !== -1) {
5812
+ indexForFocus = typeaheadCurrIndex;
5813
+ }
5814
+ else if (typeaheadStoredIndex !== -1) {
5815
+ indexForFocus = typeaheadStoredIndex;
5816
+ }
5817
+ if (this.refCollection[indexForFocus] !== null && this.refCollection[indexForFocus][0] !== null) {
5818
+ this.refCollection[indexForFocus][0].focus();
5819
+ }
5820
+ else {
5821
+ this.clearRef.current.focus();
5822
+ }
5823
+ this.setState({
5824
+ tabbedIntoFavoritesMenu: true,
5825
+ typeaheadCurrIndex: -1
5826
+ });
5827
+ };
5828
+ this.moveFocusToLastMenuItem = () => {
5829
+ const refCollectionLen = this.refCollection.length;
5830
+ if (refCollectionLen > 0 &&
5831
+ this.refCollection[refCollectionLen - 1] !== null &&
5832
+ this.refCollection[refCollectionLen - 1][0] !== null) {
5833
+ this.refCollection[refCollectionLen - 1][0].focus();
5834
+ }
5835
+ };
5836
+ this.handleTypeaheadKeys = (position, shiftKey = false) => {
5781
5837
  const { isOpen, onFavorite } = this.props;
5782
- const { typeaheadCurrIndex, tabbedIntoFavoritesMenu, typeaheadStoredIndex } = this.state;
5838
+ const { typeaheadCurrIndex, tabbedIntoFavoritesMenu } = this.state;
5783
5839
  const typeaheadActiveChild = this.getTypeaheadActiveChild(typeaheadCurrIndex);
5784
5840
  if (isOpen) {
5785
5841
  if (position === 'enter') {
@@ -5797,32 +5853,127 @@
5797
5853
  }
5798
5854
  else if (position === 'tab') {
5799
5855
  if (onFavorite) {
5856
+ // if the input has focus, tab to the first item or the last item that was previously focused.
5800
5857
  if (this.inputRef.current === document.activeElement) {
5801
- let indexForFocus = 0;
5802
- if (typeaheadCurrIndex !== -1) {
5803
- indexForFocus = typeaheadCurrIndex;
5804
- }
5805
- else if (typeaheadStoredIndex !== -1) {
5806
- indexForFocus = typeaheadStoredIndex;
5807
- }
5808
- if (this.refCollection[indexForFocus] !== null && this.refCollection[indexForFocus][0] !== null) {
5809
- this.refCollection[indexForFocus][0].focus();
5858
+ // If shift is also clicked and there is a footer, tab to the last item in tabbable footer
5859
+ if (this.props.footer && shiftKey) {
5860
+ const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
5861
+ if (tabbableItems.length > 0) {
5862
+ if (tabbableItems[tabbableItems.length - 1]) {
5863
+ tabbableItems[tabbableItems.length - 1].focus();
5864
+ }
5865
+ }
5810
5866
  }
5811
5867
  else {
5812
- this.clearRef.current.focus();
5868
+ this.switchFocusToFavoriteMenu();
5813
5869
  }
5814
- this.setState({
5815
- tabbedIntoFavoritesMenu: true,
5816
- typeaheadCurrIndex: -1
5817
- });
5818
5870
  }
5819
5871
  else {
5820
- this.inputRef.current.focus();
5821
- this.setState({ tabbedIntoFavoritesMenu: false });
5872
+ // focus is on menu or footer
5873
+ if (this.props.footer) {
5874
+ let tabbedIntoMenu = false;
5875
+ const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
5876
+ if (tabbableItems.length > 0) {
5877
+ // if current element is not in footer, tab to first tabbable element in footer,
5878
+ // if shift was clicked, tab to input since focus is on menu
5879
+ const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
5880
+ if (currentElementIndex === -1) {
5881
+ if (shiftKey) {
5882
+ // currently in menu, shift back to input
5883
+ this.inputRef.current.focus();
5884
+ }
5885
+ else {
5886
+ // currently in menu, tab to first tabbable item in footer
5887
+ tabbableItems[0].focus();
5888
+ }
5889
+ }
5890
+ else {
5891
+ // already in footer
5892
+ if (shiftKey) {
5893
+ // shift to previous item
5894
+ if (currentElementIndex === 0) {
5895
+ // on first footer item, shift back to menu
5896
+ this.switchFocusToFavoriteMenu();
5897
+ tabbedIntoMenu = true;
5898
+ }
5899
+ else {
5900
+ // shift to previous footer item
5901
+ tabbableItems[currentElementIndex - 1].focus();
5902
+ }
5903
+ }
5904
+ else {
5905
+ // tab to next tabbable item in footer or to input.
5906
+ if (tabbableItems[currentElementIndex + 1]) {
5907
+ tabbableItems[currentElementIndex + 1].focus();
5908
+ }
5909
+ else {
5910
+ this.inputRef.current.focus();
5911
+ }
5912
+ }
5913
+ }
5914
+ }
5915
+ else {
5916
+ // no tabbable items in footer, tab to input
5917
+ this.inputRef.current.focus();
5918
+ tabbedIntoMenu = false;
5919
+ }
5920
+ this.setState({ tabbedIntoFavoritesMenu: tabbedIntoMenu });
5921
+ }
5922
+ else {
5923
+ this.inputRef.current.focus();
5924
+ this.setState({ tabbedIntoFavoritesMenu: false });
5925
+ }
5822
5926
  }
5823
5927
  }
5824
5928
  else {
5825
- this.onToggle(false);
5929
+ // Close if there is no footer
5930
+ if (!this.props.footer) {
5931
+ this.onToggle(false);
5932
+ }
5933
+ else {
5934
+ // has footer
5935
+ const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
5936
+ const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
5937
+ if (this.inputRef.current === document.activeElement) {
5938
+ if (shiftKey) {
5939
+ // close toggle if shift key and tab on input
5940
+ this.onToggle(false);
5941
+ }
5942
+ else {
5943
+ // tab to first tabbable item in footer
5944
+ if (tabbableItems[0]) {
5945
+ tabbableItems[0].focus();
5946
+ }
5947
+ else {
5948
+ this.onToggle(false);
5949
+ }
5950
+ }
5951
+ }
5952
+ else {
5953
+ // focus is in footer
5954
+ if (shiftKey) {
5955
+ if (currentElementIndex === 0) {
5956
+ // shift tab back to input
5957
+ this.inputRef.current.focus();
5958
+ }
5959
+ else {
5960
+ // shift to previous footer item
5961
+ tabbableItems[currentElementIndex - 1].focus();
5962
+ }
5963
+ }
5964
+ else {
5965
+ // tab to next footer item or close tab if last item
5966
+ if (tabbableItems[currentElementIndex + 1]) {
5967
+ tabbableItems[currentElementIndex + 1].focus();
5968
+ }
5969
+ else {
5970
+ // no next item, close toggle
5971
+ this.onToggle(false);
5972
+ this.inputRef.current.focus();
5973
+ }
5974
+ }
5975
+ }
5976
+ }
5826
5977
  }
5827
5978
  }
5828
5979
  else if (!tabbedIntoFavoritesMenu) {
@@ -5979,13 +6130,13 @@
5979
6130
  /* eslint-disable @typescript-eslint/no-unused-vars */
5980
6131
  onFilter,
5981
6132
  /* eslint-disable @typescript-eslint/no-unused-vars */
5982
- onTypeaheadInputChanged, onCreateOption, isCreatable, onToggle, createText, noResultsFoundText, customBadgeText, inputIdPrefix,
6133
+ onTypeaheadInputChanged, onCreateOption, isCreatable, onToggle, createText, noResultsFoundText, customBadgeText, inputIdPrefix, inputAutoComplete,
5983
6134
  /* eslint-disable @typescript-eslint/no-unused-vars */
5984
6135
  isInputValuePersisted, isInputFilterPersisted,
5985
6136
  /* eslint-enable @typescript-eslint/no-unused-vars */
5986
6137
  menuAppendTo, favorites, onFavorite,
5987
6138
  /* eslint-disable @typescript-eslint/no-unused-vars */
5988
- favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject"]);
6139
+ favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject"]);
5989
6140
  const { focusFirstOption: openedOnEnter, typeaheadCurrIndex, typeaheadInputValue, typeaheadFilteredChildren, favoritesGroup } = this.state;
5990
6141
  const selectToggleId = toggleId || `pf-select-toggle-id-${currentId++}`;
5991
6142
  const selections = Array.isArray(selectionsProp) ? selectionsProp : [selectionsProp];
@@ -6023,11 +6174,11 @@
6023
6174
  if (isOpen) {
6024
6175
  if (renderableItems.find(item => { var _a; return ((_a = item) === null || _a === void 0 ? void 0 : _a.key) === 'loading'; }) === undefined) {
6025
6176
  if (loadingVariant === 'spinner') {
6026
- renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading", isGrouped: true },
6177
+ renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading" },
6027
6178
  React__namespace.createElement(Spinner, { size: "lg" })));
6028
6179
  }
6029
6180
  else if (loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.text) {
6030
- renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text, isGrouped: true, setViewMoreNextIndex: this.setVieMoreNextIndex, onClick: loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.onClick }));
6181
+ renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text, setViewMoreNextIndex: this.setVieMoreNextIndex, onClick: loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.onClick }));
6031
6182
  }
6032
6183
  }
6033
6184
  }
@@ -6066,6 +6217,23 @@
6066
6217
  this.handleMenuKeys(0, 0, 'right');
6067
6218
  event.preventDefault();
6068
6219
  }
6220
+ else if (event.key === KeyTypes.Tab && variant !== SelectVariant.checkbox && this.props.footer) {
6221
+ // tab to footer or close menu if shift key
6222
+ if (event.shiftKey) {
6223
+ this.onToggle(false);
6224
+ }
6225
+ else {
6226
+ const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
6227
+ if (tabbableItems.length > 0) {
6228
+ tabbableItems[0].focus();
6229
+ event.stopPropagation();
6230
+ event.preventDefault();
6231
+ }
6232
+ else {
6233
+ this.onToggle(false);
6234
+ }
6235
+ }
6236
+ }
6069
6237
  else if (event.key === KeyTypes.Tab && variant === SelectVariant.checkbox) {
6070
6238
  // More modal-like experience for checkboxes
6071
6239
  // Let SelectOption handle this
@@ -6078,7 +6246,7 @@
6078
6246
  event.stopPropagation();
6079
6247
  event.preventDefault();
6080
6248
  }
6081
- }, ref: this.filterRef, autoComplete: "never" })),
6249
+ }, ref: this.filterRef, autoComplete: inputAutoComplete })),
6082
6250
  React__namespace.createElement(Divider, { key: "inline-filter-divider" })));
6083
6251
  renderableItems = [filterBox, ...typeaheadFilteredChildren].map((option, index) => React__namespace.cloneElement(option, { key: index }));
6084
6252
  }
@@ -6140,7 +6308,7 @@
6140
6308
  " ") : innerMenu;
6141
6309
  const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$b.select, isOpen && _default$b.modifiers.expanded, validated === ValidatedOptions.success && _default$b.modifiers.success, validated === ValidatedOptions.warning && _default$b.modifiers.warning, validated === ValidatedOptions.error && _default$b.modifiers.invalid, direction === SelectDirection.up && _default$b.modifiers.top, className) }, (width && { style: { width } }), (validated !== ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== ValidatedOptions.default && { 'aria-invalid': ariaInvalid })), isOpen && menuContainer));
6142
6310
  const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$b.select, isOpen && _default$b.modifiers.expanded, validated === ValidatedOptions.success && _default$b.modifiers.success, validated === ValidatedOptions.warning && _default$b.modifiers.warning, validated === ValidatedOptions.error && _default$b.modifiers.invalid, direction === SelectDirection.up && _default$b.modifiers.top, className), ref: this.parentRef }, getOUIAProps(Select.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), (width && { style: { width } }), (validated !== ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== ValidatedOptions.default && { 'aria-invalid': ariaInvalid })),
6143
- React__namespace.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, hasPlaceholderStyle: hasPlaceholderStyle && (!selections.length || selections[0] === null || isSelectedPlaceholder), onToggle: this.onToggle, onEnter: this.onEnter, onClose: this.onClose, variant: variant, "aria-labelledby": `${ariaLabelledBy || ''} ${selectToggleId}`, "aria-label": toggleAriaLabel, handleTypeaheadKeys: this.handleTypeaheadKeys, isDisabled: isDisabled, hasClearButton: hasOnClear, hasFooter: footer !== undefined, onClickTypeaheadToggleButton: this.onClickTypeaheadToggleButton }),
6311
+ React__namespace.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, hasPlaceholderStyle: hasPlaceholderStyle && (!selections.length || selections[0] === null || isSelectedPlaceholder), onToggle: this.onToggle, onEnter: this.onEnter, onClose: this.onClose, variant: variant, "aria-labelledby": `${ariaLabelledBy || ''} ${selectToggleId}`, "aria-label": toggleAriaLabel, handleTypeaheadKeys: this.handleTypeaheadKeys, moveFocusToLastMenuItem: this.moveFocusToLastMenuItem, isDisabled: isDisabled, hasClearButton: hasOnClear, hasFooter: footer !== undefined, onClickTypeaheadToggleButton: this.onClickTypeaheadToggleButton }),
6144
6312
  customContent && (React__namespace.createElement("div", { className: css(_default$b.selectToggleWrapper) },
6145
6313
  toggleIcon && React__namespace.createElement("span", { className: css(_default$b.selectToggleIcon) }, toggleIcon),
6146
6314
  React__namespace.createElement("span", { className: css(_default$b.selectToggleText) }, placeholderText))),
@@ -6161,13 +6329,13 @@
6161
6329
  toggleIcon && React__namespace.createElement("span", { className: css(_default$b.selectToggleIcon) }, toggleIcon),
6162
6330
  React__namespace.createElement("input", { className: css(_default$f.formControl, _default$b.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-typeahead`, "aria-label": typeAheadAriaLabel, placeholder: placeholderText, value: typeaheadInputValue !== null
6163
6331
  ? typeaheadInputValue
6164
- : this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete: "never", disabled: isDisabled, ref: this.inputRef })),
6332
+ : this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
6165
6333
  hasOnClear && (selections[0] || typeaheadInputValue) && clearBtn)),
6166
6334
  variant === SelectVariant.typeaheadMulti && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
6167
6335
  React__namespace.createElement("div", { className: css(_default$b.selectToggleWrapper) },
6168
6336
  toggleIcon && React__namespace.createElement("span", { className: css(_default$b.selectToggleIcon) }, toggleIcon),
6169
6337
  selections && Array.isArray(selections) && selections.length > 0 && selectedChips,
6170
- React__namespace.createElement("input", { className: css(_default$f.formControl, _default$b.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === ValidatedOptions.error, placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete: "never", disabled: isDisabled, ref: this.inputRef })),
6338
+ React__namespace.createElement("input", { className: css(_default$f.formControl, _default$b.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === ValidatedOptions.error, placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
6171
6339
  hasOnClear && ((selections && selections.length > 0) || typeaheadInputValue) && clearBtn)),
6172
6340
  validated === ValidatedOptions.success && (React__namespace.createElement("span", { className: css(_default$b.selectToggleStatusIcon) },
6173
6341
  React__namespace.createElement(CheckCircleIcon$1, { "aria-hidden": "true" }))),
@@ -6223,6 +6391,7 @@
6223
6391
  inlineFilterPlaceholderText: null,
6224
6392
  customBadgeText: null,
6225
6393
  inputIdPrefix: '',
6394
+ inputAutoComplete: navigator.userAgent.match('Chrome') ? getUniqueId('pf-no-autocomplete') : 'off',
6226
6395
  menuAppendTo: 'inline',
6227
6396
  favorites: [],
6228
6397
  favoritesLabel: 'Favorites',