Skip to content

Commit

Permalink
Disable keepDOM in tabs and collapses
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilit committed Jan 18, 2025
1 parent f0adcf1 commit 22488c5
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/EditorSidePanel/Issues.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function Issues() {
}, [tables, relationships, issues, types, database, enums]);

return (
<Collapse keepDOM lazyRender style={{ width: "100%" }}>
<Collapse lazyRender keepDOM={false} style={{ width: "100%" }}>
<Collapse.Panel
header={
<Badge
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditorSidePanel/NotesTab/NotesTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function NotesTab() {
) : (
<Collapse
activeKey={selectedElement.open ? `${selectedElement.id}` : ""}
keepDOM
keepDOM={false}
lazyRender
onChange={(activeKey) => {
setSelectedElement((prev) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function RelationshipsTab() {
? `${selectedElement.id}`
: ""
}
keepDOM
keepDOM={false}
lazyRender
onChange={(k) =>
setSelectedElement((prev) => ({
Expand Down
1 change: 1 addition & 0 deletions src/components/EditorSidePanel/SidePanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default function SidePanel({ width, resize, setResize }) {
type="card"
activeKey={selectedElement.currentTab}
lazyRender
keepDOM={false}
onChange={(key) =>
setSelectedElement((prev) => ({ ...prev, currentTab: key }))
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/EditorSidePanel/TablesTab/TableInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default function TableInfo({ data }) {
>
<Collapse
activeKey={indexActiveKey}
keepDOM
keepDOM={false}
lazyRender
onChange={(itemKey) => setIndexActiveKey(itemKey)}
accordion
Expand All @@ -187,7 +187,7 @@ export default function TableInfo({ data }) {
style={{ marginTop: "12px", marginBottom: "12px" }}
headerLine={false}
>
<Collapse keepDOM lazyRender>
<Collapse keepDOM={false}>
<Collapse.Panel header={t("comment")} itemKey="1">
<TextArea
field="comment"
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditorSidePanel/TablesTab/TablesTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function TablesTab() {
? `${selectedElement.id}`
: ""
}
keepDOM
keepDOM={false}
lazyRender
onChange={(k) =>
setSelectedElement((prev) => ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditorSidePanel/TypesTab/TypeInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function TypeInfo({ index, data }) {
style={{ marginTop: "12px", marginBottom: "12px" }}
headerLine={false}
>
<Collapse keepDOM lazyRender>
<Collapse lazyRender keepDOM={false}>
<Collapse.Panel header={t("comment")} itemKey="1">
<TextArea
field="comment"
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditorSidePanel/TypesTab/TypesTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function TypesTab() {
? `${selectedElement.id}`
: ""
}
keepDOM
keepDOM={false}
lazyRender
onChange={(id) =>
setSelectedElement((prev) => ({
Expand Down

0 comments on commit 22488c5

Please sign in to comment.