mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Add "None" option to "Main document" menu when no root doc is set (#18102)
GitOrigin-RevId: 5e1cd6bcbf070d7b6a92a1fcd69370361a3e6d3e
This commit is contained in:
@@ -24,6 +24,14 @@ export default function SettingsDocument() {
|
||||
label: doc.path,
|
||||
}))
|
||||
|
||||
if (!rootDocId) {
|
||||
mappedDocs.unshift({
|
||||
value: '',
|
||||
label: 'None',
|
||||
disabled: true,
|
||||
})
|
||||
}
|
||||
|
||||
return mappedDocs
|
||||
}, [docs, rootDocId])
|
||||
|
||||
@@ -34,7 +42,7 @@ export default function SettingsDocument() {
|
||||
return (
|
||||
<SettingsMenuSelect
|
||||
onChange={setRootDocId}
|
||||
value={rootDocId}
|
||||
value={rootDocId ?? ''}
|
||||
options={validDocsOptions}
|
||||
label={t('main_document')}
|
||||
name="rootDocId"
|
||||
|
||||
Reference in New Issue
Block a user