Skip to content

Commit

Permalink
flux: Show the loader when data is not yet fetched
Browse files Browse the repository at this point in the history
Signed-off-by: Joaquim Rocha <joaquim.rocha@microsoft.com>
  • Loading branch information
joaquimrocha committed Oct 23, 2024
1 parent 2fc5409 commit 3b99bfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flux/src/common/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function prepareNameColumn(colProps: Partial<NameColumn> = {}): TableCol {
}

export function Table(props: TableProps) {
const { columns, ...otherProps } = props;
const { columns, data, ...otherProps } = props;

const processedColumns = React.useMemo(() => {
return columns.map(column => {
Expand Down Expand Up @@ -181,7 +181,7 @@ export function Table(props: TableProps) {
},
[columns]);

return <HTable {...otherProps} columns={processedColumns} />;
return <HTable data={data} loading={data === null} {...otherProps} columns={processedColumns} />;
}

export default Table;

0 comments on commit 3b99bfa

Please sign in to comment.