fix(core): the down arrow may show when showLinkedDoc not configured (#13220)
The original setting object on user's device not defined, so the default value `true` won't work. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved reliability of sidebar and appearance settings by ensuring toggle switches consistently reflect the correct on/off state. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -252,7 +252,7 @@ export const NavigationPanelDocNode = ({
|
|||||||
extractEmojiAsIcon={enableEmojiIcon}
|
extractEmojiAsIcon={enableEmojiIcon}
|
||||||
collapsed={isCollapsed}
|
collapsed={isCollapsed}
|
||||||
setCollapsed={setCollapsed}
|
setCollapsed={setCollapsed}
|
||||||
collapsible={appSettings.showLinkedDocInSidebar}
|
collapsible={!!appSettings.showLinkedDocInSidebar}
|
||||||
canDrop={handleCanDrop}
|
canDrop={handleCanDrop}
|
||||||
to={`/${docId}`}
|
to={`/${docId}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export const AppearanceSettings = () => {
|
|||||||
]()}
|
]()}
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
checked={appSettings.showLinkedDocInSidebar}
|
checked={!!appSettings.showLinkedDocInSidebar}
|
||||||
onChange={checked =>
|
onChange={checked =>
|
||||||
updateSettings('showLinkedDocInSidebar', checked)
|
updateSettings('showLinkedDocInSidebar', checked)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user