fix isSelectedProp for settings/calendars switches (#4589)
parent
7d277ad89f
commit
6e71de7ca3
|
@ -12,6 +12,7 @@ export function CalendarSwitch(props: {
|
|||
externalId: string;
|
||||
title: string;
|
||||
defaultSelected: boolean;
|
||||
isSelected: boolean;
|
||||
}) {
|
||||
const { t } = useLocale();
|
||||
|
||||
|
@ -69,7 +70,7 @@ export function CalendarSwitch(props: {
|
|||
key={props.externalId}
|
||||
name="enabled"
|
||||
label={props.title}
|
||||
defaultChecked={props.defaultSelected}
|
||||
defaultChecked={props.isSelected}
|
||||
onCheckedChange={(isOn: boolean) => {
|
||||
mutation.mutate({ isOn });
|
||||
}}
|
||||
|
|
|
@ -132,6 +132,7 @@ const CalendarsView = () => {
|
|||
externalId={cal.externalId}
|
||||
title={cal.name || "Nameless calendar"}
|
||||
type={item.integration.type}
|
||||
isSelected={cal.isSelected}
|
||||
defaultSelected={cal.externalId === data?.destinationCalendar?.externalId}
|
||||
/>
|
||||
))}
|
||||
|
|
Loading…
Reference in New Issue