diff --git a/packages/devui/src/Container/styles/index.ts b/packages/devui/src/Container/styles/index.ts index dab1ca8a..8c259671 100644 --- a/packages/devui/src/Container/styles/index.ts +++ b/packages/devui/src/Container/styles/index.ts @@ -6,6 +6,8 @@ export const MainContainerWrapper = styled.div` height: 100%; width: 100%; flex-flow: column nowrap; + flex-shrink: 1; + min-height: 0; background-color: ${(props) => color(props.theme.base00, 'lighten', 0.03)}; color: ${(props) => props.theme.base07}; font-size: 12px; @@ -30,7 +32,8 @@ export const MainContainerWrapper = styled.div` flex-grow: 1; display: flex; flex-flow: column nowrap; - height: 100%; + flex-shrink: 1; + min-height: 0; > div { flex-grow: 1; @@ -43,4 +46,6 @@ export const ContainerWrapper = styled.div` height: 100%; width: 100%; flex-flow: column nowrap; + flex-shrink: 1; + min-height: 0; `; diff --git a/packages/devui/src/Tabs/Tabs.tsx b/packages/devui/src/Tabs/Tabs.tsx index 38649751..7b073df0 100644 --- a/packages/devui/src/Tabs/Tabs.tsx +++ b/packages/devui/src/Tabs/Tabs.tsx @@ -24,12 +24,6 @@ export default class Tabs

extends Component> { SelectedComponent?: React.ComponentType

; selector?: () => P; - UNSAFE_componentWillReceiveProps(nextProps: TabsProps

) { - if (nextProps.selected !== this.props.selected) { - this.updateTabs(nextProps); - } - } - onMouseUp: React.MouseEventHandler = (e) => { e.currentTarget.blur(); }; @@ -38,7 +32,7 @@ export default class Tabs

extends Component> { this.props.onClick(e.currentTarget.value); }; - updateTabs(props: TabsProps

) { + updateTabs(props: TabsProps

): void { const tabs = props.tabs; const selected = props.selected; @@ -67,6 +61,8 @@ export default class Tabs

extends Component> { } render() { + this.updateTabs(nextProps); + const tabsHeader = ( Text