Repository: nextui-org/nextui
File: packages/components/select/src/use-select.ts (TypeScript)

Code before:
  Props<T>,
  keyof Omit<MultiSelectProps<T>, "onSelectionChange">
> &
  Omit<MultiSelectProps<T>, "onSelectionChange"> &
  SelectVariantProps & {
    /**
     * The height of each item in the listbox.
     * This is required for virtualized listboxes to calculate the height of each item.
     */
    itemHeight?: number;
    /**
     * The max height of the listbox (which will be rendered in a popover).
     * This is required for virtualized listboxes to set the maximum height of the listbox.
     */
    maxListboxHeight?: number;
    /**
     * Whether to enable virtualization of the listbox items.
     * By default, virtualization is automatically enabled when the number of items is greater than 50.
     * @default undefined
     */
    isVirtualized?: boolean;
    /**
     * Whether the listbox should be openable when there are no items.
     * @default true
     */
    hideEmptyContent?: boolean;
  };

export function useSelect<T extends object>(originalProps: UseSelectProps<T>) {
  const globalContext = useProviderContext();

  const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);

  const disableAnimation =
    originalProps.disableAnimation ?? globalContext?.disableAnimation ?? false;

  const {
    ref,
    as,
    label,
    name,
    isLoading,
    selectorIcon,
    isOpen,
    defaultOpen,
    onOpenChange,
    startContent,
    endContent,
    description,
    renderValue,
    onSelectionChange,

Review comment (suggestion):
```suggestion
    /**
     * Whether the listbox be prevented from opening when there are no items
     * @default false     
     */
    hideEmptyContent?: boolean;
```

Code after:
  Props<T>,
  keyof Omit<MultiSelectProps<T>, "onSelectionChange">
> &
  Omit<MultiSelectProps<T>, "onSelectionChange"> &
  SelectVariantProps & {
    /**
     * The height of each item in the listbox.
     * This is required for virtualized listboxes to calculate the height of each item.
     */
    itemHeight?: number;
    /**
     * The max height of the listbox (which will be rendered in a popover).
     * This is required for virtualized listboxes to set the maximum height of the listbox.
     */
    maxListboxHeight?: number;
    /**
     * Whether to enable virtualization of the listbox items.
     * By default, virtualization is automatically enabled when the number of items is greater than 50.
     * @default undefined
     */
    isVirtualized?: boolean;
    /**
     * Whether the listbox will be prevented from opening when there are no items.
     * @default false
     */
    hideEmptyContent?: boolean;
  };

export function useSelect<T extends object>(originalProps: UseSelectProps<T>) {
  const globalContext = useProviderContext();

  const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);

  const disableAnimation =
    originalProps.disableAnimation ?? globalContext?.disableAnimation ?? false;

  const {
    ref,
    as,
    label,
    name,
    isLoading,
    selectorIcon,
    isOpen,
    defaultOpen,
    onOpenChange,
    startContent,
    endContent,
    description,
    renderValue,
    onSelectionChange,