Skip to content

Commit

Permalink
[PBNTR-843] Alignment Issue for AdvancedTable with Specific Usecases (#…
Browse files Browse the repository at this point in the history
…4184)

alignment for first column on KPI page is off

## Fixed:


![fixed](https://github.com/user-attachments/assets/cd3a7229-e399-4440-9187-8c15c928c021)
  • Loading branch information
nidaqg authored Jan 29, 2025
1 parent d1a4042 commit 193b990
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const CustomCell = ({
<Flex
alignItems="center"
columnGap="xs"
justify={!hasAnySubRows ? "end" : "start"}
justify={!hasAnySubRows && !inlineRowLoading ? "end" : "start"}
orientation="row"
>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const TableHeaderCell = ({
sortIcon,
table
}: TableHeaderCellProps) => {
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar } =
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar, inlineRowLoading } =
useContext(AdvancedTableContext);

type justifyTypes = "none" | "center" | "start" | "end" | "between" | "around" | "evenly"
Expand Down Expand Up @@ -91,7 +91,7 @@ const isToggleExpansionEnabled =

let justifyHeader:justifyTypes;

if (header?.index === 0 && hasAnySubRows) {
if (header?.index === 0 && hasAnySubRows || (header?.index === 0 && inlineRowLoading)) {
justifyHeader = enableSorting ? "between" : "start";
} else {
justifyHeader = isLeafColumn ? "end" : "center";
Expand Down

0 comments on commit 193b990

Please sign in to comment.