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 favoritesUuids = useAppSelector(selectFavorites);
|
||||||
const teamUuids = useAppSelector(selectTeam);
|
const teamUuids = useAppSelector(selectTeam);
|
||||||
|
|
||||||
@ -62,7 +66,7 @@ const CallFavouritesDialog: React.FC<Props> = ({
|
|||||||
<Dialog onClose={handleClose} open={open} fullWidth maxWidth="sm">
|
<Dialog onClose={handleClose} open={open} fullWidth maxWidth="sm">
|
||||||
<DialogTitle>Select who to call:</DialogTitle>
|
<DialogTitle>Select who to call:</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<GroupSelect group={group} setGroup={setGroup} />
|
<GroupSelect group={group} setGroup={setGroup} onGroupChange={handleGroupChange}/>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogContent sx={{ height: "40vh" }} dividers>
|
<DialogContent sx={{ height: "40vh" }} dividers>
|
||||||
<TextField
|
<TextField
|
||||||
@ -86,7 +90,6 @@ const CallFavouritesDialog: React.FC<Props> = ({
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
onChange={(e: any) => {
|
onChange={(e: any) => {
|
||||||
handleCheck(member.uuid, e.target.checked);
|
handleCheck(member.uuid, e.target.checked);
|
||||||
console.log(checkedUuids);
|
|
||||||
}}
|
}}
|
||||||
control={
|
control={
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
|||||||
Reference in New Issue
Block a user