mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
Fixes toggle layout widget visibility (#2184)
This commit is contained in:
parent
f2088be23b
commit
5d3aefdec4
1 changed files with 2 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ import { DraggableBox } from './DraggableBox';
|
|||
import { snapToGrid as doSnapToGrid } from './snapToGrid';
|
||||
import update from 'immutability-helper';
|
||||
import { componentTypes } from './Components/components';
|
||||
import { computeComponentName } from '@/_helpers/utils';
|
||||
import { computeComponentName, resolveReferences } from '@/_helpers/utils';
|
||||
import useRouter from '@/_hooks/use-router';
|
||||
import Comments from './Comments';
|
||||
import { commentsService } from '@/_services';
|
||||
|
|
@ -201,7 +201,6 @@ export const Container = ({
|
|||
},
|
||||
},
|
||||
});
|
||||
|
||||
return undefined;
|
||||
},
|
||||
}),
|
||||
|
|
@ -437,8 +436,7 @@ export const Container = ({
|
|||
const box = boxes[key];
|
||||
const canShowInCurrentLayout =
|
||||
box.component.definition.others[currentLayout === 'mobile' ? 'showOnMobile' : 'showOnDesktop'].value;
|
||||
|
||||
if (!box.parent && canShowInCurrentLayout) {
|
||||
if (!box.parent && resolveReferences(canShowInCurrentLayout, currentState)) {
|
||||
return (
|
||||
<DraggableBox
|
||||
className={showComments && 'pointer-events-none'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue