fix small issue where selected checkboxes stay selected after changing group
This commit is contained in:
parent
0c247569b7
commit
bee47e29a8
@ -49,6 +49,10 @@ const CallFavouritesDialog: React.FC<Props> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const handleGroupChange = () => {
|
||||
setCheckedUuids([]);
|
||||
};
|
||||
|
||||
const favoritesUuids = useAppSelector(selectFavorites);
|
||||
const teamUuids = useAppSelector(selectTeam);
|
||||
|
||||
@ -62,7 +66,7 @@ const CallFavouritesDialog: React.FC<Props> = ({
|
||||
<Dialog onClose={handleClose} open={open} fullWidth maxWidth="sm">
|
||||
<DialogTitle>Select who to call:</DialogTitle>
|
||||
<DialogContent>
|
||||
<GroupSelect group={group} setGroup={setGroup} />
|
||||
<GroupSelect group={group} setGroup={setGroup} onGroupChange={handleGroupChange}/>
|
||||
</DialogContent>
|
||||
<DialogContent sx={{ height: "40vh" }} dividers>
|
||||
<TextField
|
||||
@ -86,7 +90,6 @@ const CallFavouritesDialog: React.FC<Props> = ({
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
onChange={(e: any) => {
|
||||
handleCheck(member.uuid, e.target.checked);
|
||||
console.log(checkedUuids);
|
||||
}}
|
||||
control={
|
||||
<Checkbox
|
||||
|
||||
Reference in New Issue
Block a user