mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add "None" option to "Main document" menu when no root doc is set (#18102)
GitOrigin-RevId: 5e1cd6bcbf070d7b6a92a1fcd69370361a3e6d3e
This commit is contained in:
parent
ede03daafd
commit
cb97bb5170
1 changed files with 9 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue