From 497477a3092cf4bd3afde25d6318bea359392d21 Mon Sep 17 00:00:00 2001 From: Titani Date: Wed, 16 Aug 2023 12:49:01 -0400 Subject: [PATCH] fix(Charts, Table): Fixed lit erros in chasrt and table --- .../src/components/ChartScatter/ChartScatter.tsx | 2 +- .../src/components/Table/examples/TableTreeNoInset.tsx | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx b/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx index 68cea3ac019..0727ccb175c 100644 --- a/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx +++ b/packages/react-charts/src/components/ChartScatter/ChartScatter.tsx @@ -456,7 +456,7 @@ export const ChartScatter: React.FunctionComponent = ({ // bubbleProperty is only considered if the size prop is undefined, therefore set // default size function only if bubbleProperty is not set. - if (typeof rest.size === "undefined" && typeof rest.bubbleProperty === "undefined") { + if (typeof rest.size === 'undefined' && typeof rest.bubbleProperty === 'undefined') { rest.size = ({ active }) => (active ? ChartScatterStyles.activeSize : ChartScatterStyles.size); } diff --git a/packages/react-table/src/components/Table/examples/TableTreeNoInset.tsx b/packages/react-table/src/components/Table/examples/TableTreeNoInset.tsx index 3c16708b9a6..e987b2d430f 100644 --- a/packages/react-table/src/components/Table/examples/TableTreeNoInset.tsx +++ b/packages/react-table/src/components/Table/examples/TableTreeNoInset.tsx @@ -71,8 +71,8 @@ export const TableTreeNoInset: React.FunctionComponent = () => { onCollapse: () => {}, onToggleRowDetails: () => {}, onCheckChange: (_event, isChecking) => { - setSelectedNodeNames(prevSelected => { - const otherSelectedNodeNames = prevSelected.filter(name => name === node.name); + setSelectedNodeNames((prevSelected) => { + const otherSelectedNodeNames = prevSelected.filter((name) => name === node.name); return !isChecking ? otherSelectedNodeNames : [...otherSelectedNodeNames, node.name]; }); }, @@ -89,9 +89,7 @@ export const TableTreeNoInset: React.FunctionComponent = () => { }; const childRows = - node.children && node.children.length - ? renderRows(node.children, level + 1, 1, rowIndex + 1, isHidden) - : []; + node.children && node.children.length ? renderRows(node.children, level + 1, 1, rowIndex + 1, isHidden) : []; return [