infinity-ui-elements 1.8.22 → 1.8.24
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.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3198,8 +3198,8 @@ TextField.displayName = "TextField";
|
|
|
3198
3198
|
|
|
3199
3199
|
const defaultFilter = (item, query) => {
|
|
3200
3200
|
const searchQuery = query.toLowerCase();
|
|
3201
|
-
return (item.label
|
|
3202
|
-
(item.description?.toLowerCase()
|
|
3201
|
+
return (item.label?.toLowerCase()?.includes(searchQuery) ||
|
|
3202
|
+
(item.description?.toLowerCase()?.includes(searchQuery) ?? false));
|
|
3203
3203
|
};
|
|
3204
3204
|
const SearchableDropdown = React.forwardRef(({ className, items = [], sectionHeading, isLoading = false, emptyTitle = "No Search Results Found", emptyDescription = "Add description of what the user can search for here.", emptyLinkText = "Link to support site", onEmptyLinkClick, primaryButtonText, secondaryButtonText, onPrimaryClick, onSecondaryClick, dropdownWidth = "full", showChevron = false, emptyIcon, disableFooter = false, footerLayout = "horizontal", onSearchChange, onItemSelect, filterFunction = defaultFilter, searchValue: controlledSearchValue, defaultSearchValue = "", dropdownClassName, minSearchLength = 0, showOnFocus = true, showAddNew = false, showAddNewIfDoesNotMatch = true, onAddNew, containerClassName, ...textFieldProps }, ref) => {
|
|
3205
3205
|
const [uncontrolledSearchValue, setUncontrolledSearchValue] = React.useState(defaultSearchValue);
|
|
@@ -3224,7 +3224,7 @@ const SearchableDropdown = React.forwardRef(({ className, items = [], sectionHea
|
|
|
3224
3224
|
const styles = window.getComputedStyle(element);
|
|
3225
3225
|
const zIndex = parseInt(styles.zIndex, 10);
|
|
3226
3226
|
// Check if element has modal z-index (10000) or is a modal container
|
|
3227
|
-
if (zIndex === 10000 || element.getAttribute(
|
|
3227
|
+
if (zIndex === 10000 || element.getAttribute("role") === "dialog") {
|
|
3228
3228
|
foundModal = true;
|
|
3229
3229
|
setIsInsideModal(true);
|
|
3230
3230
|
break;
|