@patternfly/react-table 4.111.6 → 4.111.7
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 +8 -0
- package/dist/umd/react-table.css +423 -423
- package/dist/umd/react-table.js +10 -3
- package/dist/umd/react-table.min.css +1805 -1805
- package/dist/umd/react-table.min.js +1 -1
- package/package.json +3 -3
package/dist/umd/react-table.js
CHANGED
|
@@ -6486,7 +6486,7 @@
|
|
|
6486
6486
|
};
|
|
6487
6487
|
this.updateTypeAheadFilteredChildren = (typeaheadInputValue, e) => {
|
|
6488
6488
|
let typeaheadFilteredChildren;
|
|
6489
|
-
const { onFilter, isCreatable, onCreateOption, createText, noResultsFoundText, children, isGrouped, isCreateSelectOptionObject, loadingVariant } = this.props;
|
|
6489
|
+
const { onFilter, isCreatable, isCreateOptionOnTop, onCreateOption, createText, noResultsFoundText, children, isGrouped, isCreateSelectOptionObject, loadingVariant } = this.props;
|
|
6490
6490
|
if (onFilter) {
|
|
6491
6491
|
/* The updateTypeAheadFilteredChildren callback is not only called on input changes but also when the children change.
|
|
6492
6492
|
* In this case the e is null but we can get the typeaheadInputValue from the state.
|
|
@@ -6573,11 +6573,17 @@
|
|
|
6573
6573
|
.includes(value.toString().toLowerCase())
|
|
6574
6574
|
}
|
|
6575
6575
|
: newValue;
|
|
6576
|
-
|
|
6576
|
+
const createSelectOption = (React__namespace.createElement(SelectOption, { key: `create ${newValue}`, value: newOptionValue, onClick: () => onCreateOption && onCreateOption(newValue) },
|
|
6577
6577
|
createText,
|
|
6578
6578
|
" \"",
|
|
6579
6579
|
newValue,
|
|
6580
6580
|
"\""));
|
|
6581
|
+
if (isCreateOptionOnTop) {
|
|
6582
|
+
typeaheadFilteredChildren.unshift(createSelectOption);
|
|
6583
|
+
}
|
|
6584
|
+
else {
|
|
6585
|
+
typeaheadFilteredChildren.push(createSelectOption);
|
|
6586
|
+
}
|
|
6581
6587
|
}
|
|
6582
6588
|
}
|
|
6583
6589
|
this.setState({
|
|
@@ -6979,7 +6985,7 @@
|
|
|
6979
6985
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
6980
6986
|
menuAppendTo, favorites, onFavorite,
|
|
6981
6987
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6982
|
-
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject, shouldResetOnSelect, isFlipEnabled, removeFindDomNode } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "onBlur", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "typeAheadAriaDescribedby", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "toggleIndicator", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject", "shouldResetOnSelect", "isFlipEnabled", "removeFindDomNode"]);
|
|
6988
|
+
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject, isCreateOptionOnTop, shouldResetOnSelect, isFlipEnabled, removeFindDomNode } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "onBlur", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "typeAheadAriaDescribedby", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "toggleIndicator", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject", "isCreateOptionOnTop", "shouldResetOnSelect", "isFlipEnabled", "removeFindDomNode"]);
|
|
6983
6989
|
const { focusFirstOption: openedOnEnter, typeaheadCurrIndex, typeaheadInputValue, typeaheadFilteredChildren, favoritesGroup } = this.state;
|
|
6984
6990
|
const selectToggleId = toggleId || `pf-select-toggle-id-${currentId++}`;
|
|
6985
6991
|
const selections = Array.isArray(selectionsProp) ? selectionsProp : [selectionsProp];
|
|
@@ -7220,6 +7226,7 @@
|
|
|
7220
7226
|
isDisabled: false,
|
|
7221
7227
|
hasPlaceholderStyle: false,
|
|
7222
7228
|
isCreatable: false,
|
|
7229
|
+
isCreateOptionOnTop: false,
|
|
7223
7230
|
validated: 'default',
|
|
7224
7231
|
'aria-label': '',
|
|
7225
7232
|
'aria-labelledby': '',
|