Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const SearchField = props => {
const { location, onChange, onFocus } = props;
const { value } = useFieldState('search_query');
const formApi = useFormApi();
const setValue = useCallback(
queryValue => {
// update search field
if (queryValue) {
formApi.setValue('search_query', queryValue);
}
// trigger the effects of clearing the field
if (typeof onChange === 'function') {
onChange('');
}
},
[formApi, onChange]
);
const SettingsActionBarButtons = () => {
const formState = useFormState()
const formApi = useFormApi()
return (
<>
<button type="button">
</button>
<button> 0 && formState.invalid}
type="submit"
variant="normal"
>
</button>
)