Debian Codegraph @

node/@patternfly/react-core/dist/js/components/SearchInput/AdvancedSearchMenu.d.ts

raw
1 /// <reference types="react" />
2 import { SearchInputSearchAttribute } from './SearchInput';
3 export interface AdvancedSearchMenuProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onChange'> {
4 /** Delimiter in the query string for pairing attributes with search values.
5 * Required whenever attributes are passed as props.
6 */
7 advancedSearchDelimiter?: string;
8 /** Array of attribute values used for dynamically generated advanced search. */
9 attributes?: string[] | SearchInputSearchAttribute[];
10 /** Additional classes added to the advanced search menu. */
11 className?: string;
12 formAdditionalItems?: React.ReactNode;
13 /** Function which builds an attribute-value map by parsing the value in the search input. */
14 getAttrValueMap?: () => {
15 [key: string]: string;
16 };
17 /** Attribute label for strings unassociated with one of the provided listed attributes. */
18 hasWordsAttrLabel?: React.ReactNode;
19 /** Flag for toggling the open/close state of the advanced search menu. */
20 isSearchMenuOpen?: boolean;
21 /** A callback for when the input value changes. */
22 onChange?: (event: React.FormEvent<HTMLInputElement>, value: string) => void;
23 /** A callback for when the user clicks the clear button. */
24 onClear?: (event: React.SyntheticEvent<HTMLButtonElement>) => void;
25 /** A callback for when the search button is clicked. */
26 onSearch?: (event: React.SyntheticEvent<HTMLButtonElement>, value: string, attrValueMap: {
27 [key: string]: string;
28 }) => void;
29 /** A callback for when the open advanced search button is clicked. */
30 onToggleAdvancedMenu?: (e: React.SyntheticEvent<HTMLButtonElement>) => void;
31 /** Ref of the input element within the search input. */
32 parentInputRef?: React.RefObject<any>;
33 /** Ref of the div wrapping the whole search input. */
34 parentRef?: React.RefObject<any>;
35 /** Label for the button which resets the advanced search form and clears the search input. */
36 resetButtonLabel?: string;
37 /** Label for the button which calls the onSearch event handler. */
38 submitSearchButtonLabel?: string;
39 /** Value of the search input. */
40 value?: string;
41 }
42 export declare const AdvancedSearchMenu: React.FunctionComponent<AdvancedSearchMenuProps>;
43 //# sourceMappingURL=AdvancedSearchMenu.d.ts.map