fix: default value
This commit is contained in:
@@ -49,7 +49,7 @@ const Index: FC<Props> = ({
|
||||
keyPrefix: 'invite_to_answer',
|
||||
});
|
||||
const [peopleList, setPeopleList] = useState<UserInfoCheck[]>([]);
|
||||
const [currentIndex, setCurrentIndex] = useState(0);
|
||||
const [currentIndex, setCurrentIndex] = useState(-1);
|
||||
const [searchValue, setSearchValue] = useState('');
|
||||
const filterAndSetPeople = (source) => {
|
||||
const filteredPeople: Type.UserInfoBase[] = [];
|
||||
@@ -85,7 +85,7 @@ const Index: FC<Props> = ({
|
||||
};
|
||||
|
||||
const resetSearch = () => {
|
||||
setCurrentIndex(0);
|
||||
setCurrentIndex(-1);
|
||||
setSearchValue('');
|
||||
setPeopleList([]);
|
||||
};
|
||||
@@ -164,10 +164,10 @@ const Index: FC<Props> = ({
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
id={p.username}
|
||||
tabIndex={-1}
|
||||
className="position-relative">
|
||||
<Form.Check.Input
|
||||
type="checkbox"
|
||||
tabIndex={-1}
|
||||
checked={Boolean(
|
||||
selectedPeople?.find((v) => v.id === p.id),
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user