@touchtech/baselayer-ui 8.1.13 → 8.1.14

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.
@@ -2,8 +2,9 @@
2
2
  import { GroupOptionType, OptionType } from "../../../types";
3
3
  type Props = {
4
4
  options: Array<OptionType | GroupOptionType>;
5
+ onFilter?: (option: OptionType, searchKeyword: string) => boolean;
5
6
  onChange?: (values: Array<string>) => void;
6
7
  };
7
8
  export declare const isOption: (option: OptionType | GroupOptionType) => option is OptionType;
8
- declare function OptionList({ options, onChange }: Props): JSX.Element;
9
+ declare function OptionList({ options, onFilter, onChange }: Props): JSX.Element;
9
10
  export default OptionList;
@@ -12,6 +12,7 @@ type SelectProps = {
12
12
  options: Array<OptionType | GroupOptionType>;
13
13
  width: string;
14
14
  onChange?: (values: Array<string>) => void;
15
+ onFilter?: (option: OptionType, searchKeyword: string) => boolean;
15
16
  };
16
- declare function Select({ className, defaultValue, disabled, multiple, options, placeholder, selectAll, size, showSelectedAsTags, width, onChange }: SelectProps): JSX.Element;
17
+ declare function Select({ className, defaultValue, disabled, multiple, options, placeholder, selectAll, size, showSelectedAsTags, width, onChange, onFilter, }: SelectProps): JSX.Element;
17
18
  export default Select;
@@ -4,6 +4,7 @@ declare namespace _default {
4
4
  }
5
5
  export default _default;
6
6
  export function Default(): JSX.Element;
7
- export function Multi(): JSX.Element;
7
+ export function Multiple(): JSX.Element;
8
+ export function MultipleWithCustomSearch(): JSX.Element;
8
9
  export function GroupedOptions(): JSX.Element;
9
10
  import Select from "./Select";
@@ -3,7 +3,8 @@ type Props = {
3
3
  children: string;
4
4
  className?: string;
5
5
  closable?: boolean;
6
- onClose?: (event: React.MouseEvent<HTMLElement>) => void;
6
+ value?: string;
7
+ onClose?: (event: React.MouseEvent<HTMLElement>, value: string) => void;
7
8
  };
8
- declare function Tag({ children, className, closable, onClose }: Props): JSX.Element;
9
+ declare function Tag({ children, className, closable, value, onClose }: Props): JSX.Element;
9
10
  export default Tag;