forked from ddrilling/asb_cloud_front
Добавлено отображение поиска пользователей
This commit is contained in:
parent
b791a5418a
commit
e84cc40f09
@ -22,6 +22,7 @@ export const CategoryEditor = memo(({ idWell, visible, category, onClosed }) =>
|
|||||||
const [users, setUsers] = useState([])
|
const [users, setUsers] = useState([])
|
||||||
const [allUsers, setAllUsers] = useState([])
|
const [allUsers, setAllUsers] = useState([])
|
||||||
const [filteredUsers, setFilteredUsers] = useState([])
|
const [filteredUsers, setFilteredUsers] = useState([])
|
||||||
|
const [isSearching, setIsSearching] = useState(false)
|
||||||
const [showLoader, setShowLoader] = useState(false)
|
const [showLoader, setShowLoader] = useState(false)
|
||||||
const [searchValue, setSearchValue] = useState('')
|
const [searchValue, setSearchValue] = useState('')
|
||||||
const [subject, setSubject] = useState(null)
|
const [subject, setSubject] = useState(null)
|
||||||
@ -40,7 +41,7 @@ export const CategoryEditor = memo(({ idWell, visible, category, onClosed }) =>
|
|||||||
].join(' ').toLowerCase().includes(searchValue))
|
].join(' ').toLowerCase().includes(searchValue))
|
||||||
setFilteredUsers(filteredUsers)
|
setFilteredUsers(filteredUsers)
|
||||||
},
|
},
|
||||||
setShowLoader,
|
setIsSearching,
|
||||||
`Не удалось произвести поиск пользователей`
|
`Не удалось произвести поиск пользователей`
|
||||||
), [users, searchValue])
|
), [users, searchValue])
|
||||||
|
|
||||||
@ -152,6 +153,7 @@ export const CategoryEditor = memo(({ idWell, visible, category, onClosed }) =>
|
|||||||
placeholder={'Поиск пользователя'}
|
placeholder={'Поиск пользователя'}
|
||||||
onChange={onSearchTextChange}
|
onChange={onSearchTextChange}
|
||||||
style={{ marginBottom: '15px' }}
|
style={{ marginBottom: '15px' }}
|
||||||
|
loading={isSearching}
|
||||||
/>
|
/>
|
||||||
<LoaderPortal show={showLoader}>
|
<LoaderPortal show={showLoader}>
|
||||||
<Table
|
<Table
|
||||||
|
Loading…
Reference in New Issue
Block a user