Добавлено отображение поиска пользователей

This commit is contained in:
Александр Сироткин 2022-02-25 17:12:56 +05:00
parent b791a5418a
commit e84cc40f09

View File

@ -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}
/>
<LoaderPortal show={showLoader}>
<Table