Merge 72da5b16f1
into f60b6291d7
This commit is contained in:
commit
ee68176331
|
@ -77,7 +77,7 @@ type Select = {
|
|||
sectionTitle: string;
|
||||
items: SelectItem[];
|
||||
})[];
|
||||
default: string | null;
|
||||
default: any | null;
|
||||
};
|
||||
|
||||
type Result = string | number | true | null;
|
||||
|
|
|
@ -511,7 +511,7 @@ type SelectItem<C> = {
|
|||
export function select<C = unknown>(props: {
|
||||
title?: string;
|
||||
text?: string;
|
||||
default: string;
|
||||
default: C;
|
||||
items: (SelectItem<C> | {
|
||||
sectionTitle: string;
|
||||
items: SelectItem<C>[];
|
||||
|
@ -524,7 +524,7 @@ export function select<C = unknown>(props: {
|
|||
export function select<C = unknown>(props: {
|
||||
title?: string;
|
||||
text?: string;
|
||||
default?: string | null;
|
||||
default?: C | null;
|
||||
items: (SelectItem<C> | {
|
||||
sectionTitle: string;
|
||||
items: SelectItem<C>[];
|
||||
|
@ -537,7 +537,7 @@ export function select<C = unknown>(props: {
|
|||
export function select<C = unknown>(props: {
|
||||
title?: string;
|
||||
text?: string;
|
||||
default?: string | null;
|
||||
default?: C | null;
|
||||
items: (SelectItem<C> | {
|
||||
sectionTitle: string;
|
||||
items: SelectItem<C>[];
|
||||
|
|
|
@ -62,7 +62,7 @@ async function setAntenna() {
|
|||
})),
|
||||
} : undefined),
|
||||
],
|
||||
default: props.column.antennaId,
|
||||
default: antennas.find(x => x.id === props.column.antennaId),
|
||||
});
|
||||
if (canceled || antenna == null) return;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ async function setChannel() {
|
|||
items: channels.map(x => ({
|
||||
value: x, text: x.name,
|
||||
})),
|
||||
default: props.column.channelId,
|
||||
default: channels.find(x => x.id === props.column.channelId),
|
||||
});
|
||||
if (canceled || chosenChannel == null) return;
|
||||
updateColumn(props.column.id, {
|
||||
|
|
|
@ -69,7 +69,7 @@ async function setList() {
|
|||
})),
|
||||
} : undefined),
|
||||
],
|
||||
default: props.column.listId,
|
||||
default: lists.find(x => x.id === props.column.listId),
|
||||
});
|
||||
if (canceled || list == null) return;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ async function setRole() {
|
|||
items: roles.map(x => ({
|
||||
value: x, text: x.name,
|
||||
})),
|
||||
default: props.column.roleId,
|
||||
default: roles.find(x => x.id === props.column.roleId),
|
||||
});
|
||||
if (canceled || role == null) return;
|
||||
updateColumn(props.column.id, {
|
||||
|
|
|
@ -104,6 +104,7 @@ async function setType() {
|
|||
}, {
|
||||
value: 'global' as const, text: i18n.ts._timelines.global,
|
||||
}],
|
||||
default: props.column.tl,
|
||||
});
|
||||
if (canceled) {
|
||||
if (props.column.tl == null) {
|
||||
|
|
Loading…
Reference in New Issue