mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 17:24:00 +00:00
fix
This commit is contained in:
@@ -54,17 +54,16 @@ export default function WidgetColumnBar({ children }) {
|
|||||||
{childArray.map((widget, index) => {
|
{childArray.map((widget, index) => {
|
||||||
if (!widget) return null;
|
if (!widget) return null;
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={widget.props.name}>
|
||||||
<WidgetTitle onClick={() => toggleCollapsed(widget.props.name)}>{widget.props.title}</WidgetTitle>
|
<WidgetTitle onClick={() => toggleCollapsed(widget.props.name)}>{widget.props.title}</WidgetTitle>
|
||||||
<WidgetContainer
|
<WidgetContainer
|
||||||
parentHeight={dimensions && dimensions.height}
|
parentHeight={dimensions && dimensions.height}
|
||||||
visible={!collapsedWidgets.includes(widget.props.name)}
|
visible={!collapsedWidgets.includes(widget.props.name)}
|
||||||
widget={widget}
|
widget={widget}
|
||||||
key={widget.props.name}
|
|
||||||
initialSize={widget.props.height}
|
initialSize={widget.props.height}
|
||||||
splitterVisible={!!childArray.slice(index + 1).find((x) => x && !collapsedWidgets.includes(x.props.name))}
|
splitterVisible={!!childArray.slice(index + 1).find((x) => x && !collapsedWidgets.includes(x.props.name))}
|
||||||
/>
|
/>
|
||||||
</>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</WidgetsMainContainer>
|
</WidgetsMainContainer>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import theme from '../theme';
|
// import theme from '../theme';
|
||||||
import { useLeftPanelWidth } from '../utility/globalState';
|
import { useLeftPanelWidth } from '../utility/globalState';
|
||||||
|
|
||||||
export const SearchBoxWrapper = styled.div`
|
export const SearchBoxWrapper = styled.div`
|
||||||
@@ -20,18 +20,18 @@ export const WidgetsMainContainer = styled.div`
|
|||||||
|
|
||||||
const StyledWidgetsOuterContainer = styled.div`
|
const StyledWidgetsOuterContainer = styled.div`
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: ${(props) => props.leftPanelWidth}px;
|
// width: ${(props) => props.leftPanelWidth}px;
|
||||||
position: relative;
|
position: relative;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
display: flex;
|
display: flex;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export function WidgetsOuterContainer({ children, style = undefined, refNode = undefined }) {
|
export function WidgetsOuterContainer({ children, style = undefined, refNode = undefined }) {
|
||||||
const leftPanelWidth = useLeftPanelWidth();
|
// const leftPanelWidth = useLeftPanelWidth();
|
||||||
return (
|
return (
|
||||||
<StyledWidgetsOuterContainer
|
<StyledWidgetsOuterContainer
|
||||||
ref={refNode}
|
ref={refNode}
|
||||||
leftPanelWidth={leftPanelWidth}
|
// leftPanelWidth={leftPanelWidth}
|
||||||
style={{
|
style={{
|
||||||
...style,
|
...style,
|
||||||
flex: style && (style.height != null || style.width != null) ? undefined : '1 1 0',
|
flex: style && (style.height != null || style.width != null) ? undefined : '1 1 0',
|
||||||
|
|||||||
Reference in New Issue
Block a user