usePropertyFilter
is a React hook for managing PropertyFilter
's state with
React Router.
Type: 'and' | 'or'
(optional)
Type: string
(optional)
Default: ','
Type: string[]
(optional)
The property keys array specifies which search parameters in the URL belong to the property filter. When the property filter tokens change, only search keys present in this array are changed. This is important for maintaining other search keys.
PropertyFilter
's onChange
prop
PropertyFilter
's query
prop
import PropertyFilter from '@awsui/components-react/property-filter';
import { usePropertyFilter } from 'use-next-awsui';
const FILTERING_PROPERTIES = [
// ...
];
export default function MyPropertyFilter() {
const { handleChange, query } = usePropertyFilter();
return (
<PropertyFilter
filteringProperties={FILTERING_PROPERTIES}
onChange={handleChange}
query={query}
/>
);
}