@true-engineering/true-react-common-ui-kit 4.0.0-alpha31 → 4.0.0-alpha32

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.
@@ -3,11 +3,11 @@ import { ICommonProps, IDropdownWithPopperOptions } from '../../types';
3
3
  import { IIcon } from '../Icon';
4
4
  import { IInputProps } from '../Input';
5
5
  import { ISearchInputProps } from '../SearchInput';
6
- import { IChangeSelectEvent, IMultipleSelectValue } from './types';
6
+ import { IChangeSelectEvent, IMultipleSelectValue, ISelectFooter } from './types';
7
7
  import { ISelectStyles } from './Select.styles';
8
8
  export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChange' | 'onBlur' | 'type' | 'tweakStyles'>, ICommonProps<ISelectStyles> {
9
9
  header?: ReactNode;
10
- footer?: ReactNode;
10
+ footer?: ISelectFooter<Value>;
11
11
  defaultOptionLabel?: ReactNode;
12
12
  allOptionsLabel?: string;
13
13
  noMatchesLabel?: string;
@@ -1,4 +1,8 @@
1
1
  import { ChangeEvent, KeyboardEvent } from 'react';
2
+ import { IRenderNode } from '../../types';
2
3
  import { IChangeInputEvent } from '../Input';
3
4
  export type IMultipleSelectValue<Value> = Array<NonNullable<Value>>;
4
5
  export type IChangeSelectEvent = IChangeInputEvent | ChangeEvent<HTMLElement> | KeyboardEvent;
6
+ export type ISelectFooter<T> = IRenderNode<{
7
+ filteredOptions: T[];
8
+ }>;
@@ -12580,7 +12580,9 @@ function Select(props) {
12580
12580
  allOptionsLabel: shouldShowAllOption && allOptionsLabel,
12581
12581
  areAllOptionsSelected,
12582
12582
  customListHeader: customHeader,
12583
- customListFooter: footer,
12583
+ customListFooter: applyAction(footer, {
12584
+ filteredOptions
12585
+ }),
12584
12586
  noMatchesLabel,
12585
12587
  focusedIndex: focusedListCellIndex,
12586
12588
  activeValue: value,