fis-component 0.1.16 → 0.1.17

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/cjs/index.js CHANGED
@@ -74819,7 +74819,7 @@ function isMenuSize(value) {
74819
74819
  return value === "sm" || value === "md";
74820
74820
  }
74821
74821
 
74822
- const FISSelect = React.forwardRef(({ className, style, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholder, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal, maxHeight, onPopupScroll, onOpen, hideChip, tooltipTitle, tooltipVariant = "primary", ...restProps }, ref) => {
74822
+ const FISSelect = React.forwardRef(({ className, style, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholder, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal = true, maxHeight, onPopupScroll, onOpen, hideChip, tooltipTitle, tooltipVariant = "primary", ...restProps }, ref) => {
74823
74823
  const [isOpen, setIsOpen] = React.useState(false);
74824
74824
  const [referenceElement, setReferenceElement] = React.useState(null);
74825
74825
  const [popperElement, setPopperElement] = React.useState(null);
@@ -74851,8 +74851,8 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
74851
74851
  },
74852
74852
  ],
74853
74853
  placement: "bottom-start",
74854
- strategy: "fixed",
74855
- }), []);
74854
+ strategy: portal ? "fixed" : "absolute",
74855
+ }), [portal]);
74856
74856
  const { styles, attributes } = usePopper(referenceElement, popperElement, popperOptions);
74857
74857
  const selectedItems = React.useMemo(() => {
74858
74858
  const allItems = options.flatMap((group) => group.items);