mirror of
https://github.com/supabase/supabase.git
synced 2026-10-19 08:09:11 +03:00
Implemented from-to inputs
This commit is contained in:
1 parent
b830ee41cd
commit
f0ea00cf66
2 files changed
+13
-1
No files matched your search
@@ -86,7 +86,7 @@ const LogPanel: FC<Props> = ({
|
||||
}
|
||||
}
|
||||
|
||||
const handleFromChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const handleToChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const value = e.target.value
|
||||
if (value !== '' && isNaN(Date.parse(value))) {
|
||||
setTo({ value, error: 'Invalid ISO 8601 timestamp' })
|
||||
|
||||
@@ -91,6 +91,18 @@ export const LogPage: NextPage = () => {
|
||||
}
|
||||
}, [s, te, ts])
|
||||
|
||||
useEffect(() => {
|
||||
router.push({
|
||||
pathname: router.pathname,
|
||||
query: {
|
||||
...router.query,
|
||||
q: undefined,
|
||||
s: filters.search_query || '',
|
||||
ts: params.timestamp_start,
|
||||
te: params.timestamp_end,
|
||||
},
|
||||
})
|
||||
}, [params.timestamp_end, params.timestamp_start, filters.search_query])
|
||||
const onSelectTemplate = (template: LogTemplate) => {
|
||||
setFilters((prev) => ({ ...prev, search_query: template.searchString }))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user