Use forceRender to prevent elements flickering

This commit is contained in:
IRBorisov 2023-11-07 11:03:59 +03:00
parent dc0e527a0b
commit 07e0959d38

View File

@ -384,6 +384,7 @@ function RSTabs() {
selectedIndex={activeTab}
onSelect={onSelectTab}
defaultFocus
forceRenderTabPanel
selectedTabClassName='clr-selected'
className='flex flex-col items-center w-full'
>
@ -419,7 +420,7 @@ function RSTabs() {
</TabList>
<div className='overflow-y-auto' style={{ maxHeight: panelHeight}}>
<TabPanel>
<TabPanel style={{ display: activeTab === RSTabID.CARD ? '': 'none' }}>
<EditorRSForm
isModified={isModified}
setIsModified={setIsModified}
@ -430,7 +431,7 @@ function RSTabs() {
/>
</TabPanel>
<TabPanel>
<TabPanel style={{ display: activeTab === RSTabID.CST_LIST ? '': 'none' }}>
<EditorItems
onOpenEdit={onOpenCst}
onCreateCst={promptCreateCst}
@ -439,7 +440,7 @@ function RSTabs() {
/>
</TabPanel>
<TabPanel>
<TabPanel style={{ display: activeTab === RSTabID.CST_EDIT ? '': 'none' }}>
<EditorConstituenta
isModified={isModified}
setIsModified={setIsModified}
@ -454,7 +455,7 @@ function RSTabs() {
/>
</TabPanel>
<TabPanel>
<TabPanel style={{ display: activeTab === RSTabID.TERM_GRAPH ? '': 'none' }}>
<EditorTermGraph
onOpenEdit={onOpenCst}
onCreateCst={promptCreateCst}