mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
fix(wizard): debounce name state [EE-4177] (#8042)
move debouncing to the component (from the validation). debounce returns undefined when it's not calling the debounced function, and undefined is considered a validation error.
This commit is contained in:
parent
253a3a2b40
commit
7006c17ce4
9 changed files with 74 additions and 58 deletions
|
@ -8,7 +8,7 @@ import {
|
|||
} from 'react-table';
|
||||
|
||||
import { NomadEvent } from '@/react/nomad/types';
|
||||
import { useDebounce } from '@/react/hooks/useDebounce';
|
||||
import { useDebouncedValue } from '@/react/hooks/useDebouncedValue';
|
||||
|
||||
import { PaginationControls } from '@@/PaginationControls';
|
||||
import {
|
||||
|
@ -42,7 +42,7 @@ export function EventsDatatable({ data, isLoading }: EventsDatatableProps) {
|
|||
useTableSettings<EventsTableSettings>();
|
||||
const [searchBarValue, setSearchBarValue] = useSearchBarState('events');
|
||||
const columns = useColumns();
|
||||
const debouncedSearchValue = useDebounce(searchBarValue);
|
||||
const debouncedSearchValue = useDebouncedValue(searchBarValue);
|
||||
|
||||
const {
|
||||
getTableProps,
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
import { useRowSelectColumn } from '@lineup-lite/hooks';
|
||||
|
||||
import { Job } from '@/react/nomad/types';
|
||||
import { useDebounce } from '@/react/hooks/useDebounce';
|
||||
import { useDebouncedValue } from '@/react/hooks/useDebouncedValue';
|
||||
|
||||
import { PaginationControls } from '@@/PaginationControls';
|
||||
import {
|
||||
|
@ -51,7 +51,7 @@ export function JobsDatatable({
|
|||
const { settings, setTableSettings } = useTableSettings<JobsTableSettings>();
|
||||
const [searchBarValue, setSearchBarValue] = useSearchBarState('jobs');
|
||||
const columns = useColumns();
|
||||
const debouncedSearchValue = useDebounce(searchBarValue);
|
||||
const debouncedSearchValue = useDebouncedValue(searchBarValue);
|
||||
useRepeater(settings.autoRefreshRate, refreshData);
|
||||
|
||||
const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue