@homecode/ui 4.30.5 → 4.30.6

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.
@@ -68,7 +68,7 @@ const SIZE_TO_ITEM_HEIGHT = {
68
68
  l: 50,
69
69
  };
70
70
  function Autocomplete(props) {
71
- const { className, inputWrapperClassName, value, onChange, size = 'm', getOptions, onSelect, items, itemHeight = SIZE_TO_ITEM_HEIGHT[size], pageSize = 20, debounceDelay = 300, round = false, blur = false, inputProps = {}, popupProps = {}, menuProps = {}, } = props;
71
+ const { className, inputWrapperClassName, value, onChange, size = 'm', getOptions, onSelect, items, itemHeight = SIZE_TO_ITEM_HEIGHT[size], pageSize = 20, debounceDelay = 300, round = false, blur = false, inputProps = {}, popupProps = {}, menuProps = {}, scrollProps = {}, } = props;
72
72
  const isMounted = useIsMounted();
73
73
  const [filteredItems, setFilteredItems] = useState([]);
74
74
  const [currentFilter, setCurrentFilter] = useState('');
@@ -240,7 +240,8 @@ function Autocomplete(props) {
240
240
  const computedTotalCount = currentFilter ? totalCount : displayItems.length;
241
241
  return (jsx(ListScroll, { className: cn(S.options, menuProps.className), scrollProps: {
242
242
  y: true,
243
- className: S.scroll,
243
+ ...scrollProps,
244
+ className: cn(S.scroll, scrollProps?.className),
244
245
  }, itemHeight: itemHeight, itemsCount: displayItems.length, totalCount: computedTotalCount, overlapCount: 10, pageSize: pageSize, onScrollEnd: handleScrollEnd, renderItem: renderItem, contentAfter: hasMore &&
245
246
  isLoadingMore && (jsx("div", { style: { padding: '8px 12px', textAlign: 'center' }, children: jsx(Shimmer, { size: size, round: round }) })) }));
246
247
  }, [
@@ -2,6 +2,7 @@ import { FormControl, Size } from 'uilib/types';
2
2
  import { Props as InputProps } from 'uilib/components/Input/Input.types';
3
3
  import { Props as PopupProps } from 'uilib/components/Popup/Popup.types';
4
4
  import { MenuProps } from 'uilib/components/Menu/Menu.types';
5
+ import { ScrollProps } from 'uilib/components/Scroll/Scroll';
5
6
  export type Option = {
6
7
  id: string;
7
8
  label: string;
@@ -22,6 +23,7 @@ export type Props = FormControl<Value, HTMLInputElement> & {
22
23
  debounceDelay?: number;
23
24
  inputProps?: Partial<InputProps>;
24
25
  popupProps?: Partial<PopupProps>;
26
+ scrollProps?: Partial<ScrollProps>;
25
27
  menuProps?: Partial<MenuProps>;
26
28
  round?: boolean;
27
29
  blur?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.30.5",
3
+ "version": "4.30.6",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",