From 8731de1520705c29bfacbdf78c362912c6945132 Mon Sep 17 00:00:00 2001 From: Oleg Shur Date: Sun, 2 Oct 2022 14:38:36 +0300 Subject: [PATCH] Add scrollable wrapper to the new table component (#2692) --- .../src/components/App.styled.ts | 3 +- .../Brokers/Broker/Configs/Configs.styled.ts | 2 +- .../Brokers/Broker/Configs/InputCell.tsx | 2 +- .../Topic/MessagesV2/Messages.styled.ts | 6 +- .../common/NewTable/Table.styled.ts | 4 + .../src/components/common/NewTable/Table.tsx | 164 +++++++++--------- kafka-ui-react-app/src/theme/theme.ts | 1 + 7 files changed, 96 insertions(+), 86 deletions(-) diff --git a/kafka-ui-react-app/src/components/App.styled.ts b/kafka-ui-react-app/src/components/App.styled.ts index 71353f0876..90eade047d 100644 --- a/kafka-ui-react-app/src/components/App.styled.ts +++ b/kafka-ui-react-app/src/components/App.styled.ts @@ -20,9 +20,10 @@ export const Container = styled.main( position: relative; padding-bottom: 30px; z-index: 20; - + max-width: calc(100vw - ${theme.layout.navBarWidth}); @media screen and (max-width: 1023px) { margin-left: initial; + max-width: 100vw; } ` ); diff --git a/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.styled.ts b/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.styled.ts index a49bcf5d7d..03030b1249 100644 --- a/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.styled.ts +++ b/kafka-ui-react-app/src/components/Brokers/Broker/Configs/Configs.styled.ts @@ -12,7 +12,7 @@ export const Value = styled.span` line-height: 24px; margin-right: 10px; text-overflow: ellipsis; - width: 600px; + max-width: 400px; overflow: hidden; white-space: nowrap; `; diff --git a/kafka-ui-react-app/src/components/Brokers/Broker/Configs/InputCell.tsx b/kafka-ui-react-app/src/components/Brokers/Broker/Configs/InputCell.tsx index ceeff2bd59..422abbbac9 100644 --- a/kafka-ui-react-app/src/components/Brokers/Broker/Configs/InputCell.tsx +++ b/kafka-ui-react-app/src/components/Brokers/Broker/Configs/InputCell.tsx @@ -70,7 +70,7 @@ const InputCell: React.FC = ({ row, getValue, onUpdate }) => { : { fontWeight: 400 } } > - {initialValue} + {initialValue}