Skip to content
Snippets Groups Projects
Commit 540e6e4f authored by syuilo's avatar syuilo
Browse files

fix(client): ページ編集時のドロップダウンメニューなどが動作しない問題を修正

parent 7a66c9b5
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@
### Bugfixes
- リレー向けのActivityが一部実装で除外されてしまうことがあるのを修正
- 削除したノートやユーザーがリモートから参照されると復活することがあるのを修正
- クライアント: ページ編集時のドロップダウンメニューなどが動作しない問題を修正
## 12.94.1 (2021/10/25)
......
......@@ -150,26 +150,26 @@ export default defineComponent({
});
};
for (const optionOrOptgroup of options) {
if (optionOrOptgroup.type === 'optgroup') {
const optgroup = optionOrOptgroup;
menu.push({
type: 'label',
text: optgroup.props.label,
});
for (const option of optgroup.children) {
const scanOptions = (options: VNode[]) => {
for (const vnode of options) {
if (vnode.type === 'optgroup') {
const optgroup = vnode;
menu.push({
type: 'label',
text: optgroup.props.label,
});
scanOptions(optgroup.children);
} else if (Array.isArray(vnode.children)) { // 何故かフラグメントになってくることがある
const fragment = vnode;
scanOptions(fragment.children);
} else {
const option = vnode;
pushOption(option);
}
} else if (Array.isArray(optionOrOptgroup.children)) { // 何故かフラグメントになってくることがある
const fragment = optionOrOptgroup;
for (const option of fragment.children) {
pushOption(option);
}
} else {
const option = optionOrOptgroup;
pushOption(option);
}
}
};
scanOptions(options);
os.popupMenu(menu, container.value, {
width: container.value.offsetWidth,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment