fix(sw-350): fixed ui-comments for calendar, search and widget
This commit is contained in:
@@ -48,15 +48,6 @@ export default function Search({ locations }: SearchProps) {
|
||||
dispatch({ type: ActionType.CLEAR_HISTORY_LOCATIONS })
|
||||
}
|
||||
|
||||
function handleOnBlur() {
|
||||
if (!value && state.searchData?.name) {
|
||||
setValue(name, state.searchData.name)
|
||||
// Always need to manually trigger
|
||||
// revalidation when setting value r-h-f
|
||||
trigger()
|
||||
}
|
||||
}
|
||||
|
||||
function handleOnChange(
|
||||
evt: FormEvent<HTMLInputElement> | ChangeEvent<HTMLInputElement>
|
||||
) {
|
||||
@@ -67,6 +58,7 @@ export default function Search({ locations }: SearchProps) {
|
||||
type: ActionType.SEARCH_LOCATIONS,
|
||||
})
|
||||
} else {
|
||||
console.log("clear")
|
||||
dispatch({ type: ActionType.CLEAR_SEARCH_LOCATIONS })
|
||||
}
|
||||
}
|
||||
@@ -156,7 +148,6 @@ export default function Search({ locations }: SearchProps) {
|
||||
}),
|
||||
...register(name, {
|
||||
onBlur: function () {
|
||||
handleOnBlur()
|
||||
closeMenu()
|
||||
},
|
||||
onChange: handleOnChange,
|
||||
|
||||
Reference in New Issue
Block a user