infinity-ui-elements 1.8.23 → 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.js
CHANGED
|
@@ -3219,8 +3219,8 @@ TextField.displayName = "TextField";
|
|
|
3219
3219
|
|
|
3220
3220
|
const defaultFilter = (item, query) => {
|
|
3221
3221
|
const searchQuery = query.toLowerCase();
|
|
3222
|
-
return (item.label
|
|
3223
|
-
(item.description?.toLowerCase()
|
|
3222
|
+
return (item.label?.toLowerCase()?.includes(searchQuery) ||
|
|
3223
|
+
(item.description?.toLowerCase()?.includes(searchQuery) ?? false));
|
|
3224
3224
|
};
|
|
3225
3225
|
const SearchableDropdown = React__namespace.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) => {
|
|
3226
3226
|
const [uncontrolledSearchValue, setUncontrolledSearchValue] = React__namespace.useState(defaultSearchValue);
|
|
@@ -3245,7 +3245,7 @@ const SearchableDropdown = React__namespace.forwardRef(({ className, items = [],
|
|
|
3245
3245
|
const styles = window.getComputedStyle(element);
|
|
3246
3246
|
const zIndex = parseInt(styles.zIndex, 10);
|
|
3247
3247
|
// Check if element has modal z-index (10000) or is a modal container
|
|
3248
|
-
if (zIndex === 10000 || element.getAttribute(
|
|
3248
|
+
if (zIndex === 10000 || element.getAttribute("role") === "dialog") {
|
|
3249
3249
|
foundModal = true;
|
|
3250
3250
|
setIsInsideModal(true);
|
|
3251
3251
|
break;
|