diff --git a/src/pages/DrillingProgram/CategoryEditor.jsx b/src/pages/DrillingProgram/CategoryEditor.jsx index 3cbb1c9..f9ebbbf 100644 --- a/src/pages/DrillingProgram/CategoryEditor.jsx +++ b/src/pages/DrillingProgram/CategoryEditor.jsx @@ -22,6 +22,7 @@ export const CategoryEditor = memo(({ idWell, visible, category, onClosed }) => const [users, setUsers] = useState([]) const [allUsers, setAllUsers] = useState([]) const [filteredUsers, setFilteredUsers] = useState([]) + const [isSearching, setIsSearching] = useState(false) const [showLoader, setShowLoader] = useState(false) const [searchValue, setSearchValue] = useState('') const [subject, setSubject] = useState(null) @@ -40,7 +41,7 @@ export const CategoryEditor = memo(({ idWell, visible, category, onClosed }) => ].join(' ').toLowerCase().includes(searchValue)) setFilteredUsers(filteredUsers) }, - setShowLoader, + setIsSearching, `Не удалось произвести поиск пользователей` ), [users, searchValue]) @@ -152,6 +153,7 @@ export const CategoryEditor = memo(({ idWell, visible, category, onClosed }) => placeholder={'Поиск пользователя'} onChange={onSearchTextChange} style={{ marginBottom: '15px' }} + loading={isSearching} />