chore: search on enter for image picker popover unsplash input (#5499)

This commit is contained in:
Dima Hinev 2024-09-03 15:59:48 +03:00 committed by GitHub
parent 3fbfe94f5f
commit a36d4480bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,6 +215,12 @@ export const ImagePickerPopover: React.FC<Props> = observer((props) => {
id="search"
name="search"
type="text"
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
setSearchParams(formData.search);
}
}}
value={value}
onChange={(e) => setFormData({ ...formData, search: e.target.value })}
ref={ref}