mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 12:25:22 +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
|
@ -2,7 +2,7 @@ import { useState } from 'react';
|
|||
|
||||
import { useEnvironmentList } from '@/react/portainer/environments/queries/useEnvironmentList';
|
||||
import { EdgeTypes, Environment } from '@/react/portainer/environments/types';
|
||||
import { useDebounce } from '@/react/hooks/useDebounce';
|
||||
import { useDebouncedValue } from '@/react/hooks/useDebouncedValue';
|
||||
|
||||
import { useSearchBarState } from '@@/datatables/SearchBar';
|
||||
import {
|
||||
|
@ -85,7 +85,7 @@ function Loader({ children, storageKey }: LoaderProps) {
|
|||
});
|
||||
|
||||
const [search, setSearch] = useSearchBarState(storageKey);
|
||||
const debouncedSearchValue = useDebounce(search);
|
||||
const debouncedSearchValue = useDebouncedValue(search);
|
||||
|
||||
const { environments, isLoading, totalCount } = useEnvironmentList(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue