Fix: deckのタイムラインセレクタのデフォルトの値が現在のタイムラインではない問題 (#16008)

* fix: os.selectの型定義の上で default が文字列である問題を修正

* fix: deckのタイムライン選択画面で今指定されているタイムラインがデフォルトで選択されない問題

* fix lint

* fix: type error
This commit is contained in:
anatawa12 2025-12-12 12:53:59 +09:00 committed by GitHub
parent d74aded35f
commit 78435dc8d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 4 deletions

View File

@ -63,7 +63,7 @@ async function setAntenna() {
})),
} : undefined),
],
default: props.column.antennaId,
default: antennas.find(x => x.id === props.column.antennaId)?.id,
});
if (canceled || antennaIdOrOperation == null) return;

View File

@ -63,7 +63,7 @@ async function setChannel() {
items: channels.map(x => ({
value: x.id, label: x.name,
})),
default: props.column.channelId,
default: channels.find(x => x.id === props.column.channelId)?.id,
});
if (canceled || chosenChannelId == null) return;
const chosenChannel = channels.find(x => x.id === chosenChannelId)!;

View File

@ -70,7 +70,7 @@ async function setList() {
})),
} : undefined),
],
default: props.column.listId,
default: lists.find(x => x.id === props.column.listId)?.id,
});
if (canceled || listIdOrOperation == null) return;

View File

@ -54,7 +54,7 @@ async function setRole() {
items: roles.map(x => ({
value: x.id, label: x.name,
})),
default: props.column.roleId,
default: roles.find(x => x.id === props.column.roleId)?.id,
});
if (canceled || roleId == null) return;
const role = roles.find(x => x.id === roleId)!;

View File

@ -104,6 +104,7 @@ async function setType() {
}, {
value: 'global', label: i18n.ts._timelines.global,
}],
default: props.column.tl,
});
if (canceled) {
if (props.column.tl == null) {