@g4rcez/components 2.2.6 → 2.2.8
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/components/form/autocomplete.jsx +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/dom.d.ts.map +1 -1
- package/dist/lib/dom.js +5 -2
- package/package.json +1 -1
|
@@ -15,9 +15,9 @@ import { InputField } from "./input-field";
|
|
|
15
15
|
const Frag = (props) => <Fragment>{props.children}</Fragment>;
|
|
16
16
|
const transitionStyles = {
|
|
17
17
|
duration: 200,
|
|
18
|
-
initial: { transform: "scaleY(0)", opacity: 0.2 },
|
|
19
18
|
open: { transform: "scaleY(1)", opacity: 1 },
|
|
20
19
|
close: { transform: "scaleY(0)", opacity: 0 },
|
|
20
|
+
initial: { transform: "scaleY(0)", opacity: 0.2 },
|
|
21
21
|
};
|
|
22
22
|
const emptyRef = [];
|
|
23
23
|
const List = forwardRef(function VirtualList(props, ref) {
|
|
@@ -84,7 +84,7 @@ export const Autocomplete = forwardRef(({ left, error, right, loading, options,
|
|
|
84
84
|
const DEFAULT_SIZE = getRemainingSize(refs.reference.current, window.innerHeight);
|
|
85
85
|
const maxH = Math.min(fullSize < MIN_SIZE ? DEFAULT_SIZE : fullSize, DEFAULT_SIZE, args.availableHeight);
|
|
86
86
|
const size = displayList.length === 0 ? MIN_SIZE : Math.min(maxH, DEFAULT_SIZE, fullSize);
|
|
87
|
-
const mw = `${fieldset.current
|
|
87
|
+
const mw = `${fieldset.current?.getBoundingClientRect().width || DEFAULT_SIZE}px`;
|
|
88
88
|
Object.assign(args.elements.floating.style, { width: mw, maxWidth: mw, height: size });
|
|
89
89
|
},
|
|
90
90
|
}),
|