import type { I18n } from '@uppy/utils' import { useSearchForm } from './useSearchForm.js' interface FilterInputProps { value: string onChange: (value: string) => void onSubmit: () => void inputLabel: string i18n: I18n } /** * FilterInput component for client-side filtering with search icon and clear button. * Supports Enter key submission via form element. */ function FilterInput({ value, onChange, onSubmit, inputLabel, i18n, }: FilterInputProps) { const { formId } = useSearchForm(onSubmit) return (
onChange((e.target as HTMLInputElement).value)} form={formId} data-uppy-super-focusable /> {value && ( )}
) } export default FilterInput