Skip to content

Commit

Permalink
chore: Update table props
Browse files Browse the repository at this point in the history
  • Loading branch information
jessieweiyi committed Sep 19, 2024
1 parent 8e61cde commit 524556a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const FullDataTable: FC<TableProps & InternalTableProps> = ({
disableRowSelect = false,
selectionType = 'multi',
filter: filterComponent,
selectedItems = [],
selectedItems,
header,
trackBy = DEFAULT_TRACK_BY,
collectionPreferences,
Expand Down Expand Up @@ -77,7 +77,7 @@ const FullDataTable: FC<TableProps & InternalTableProps> = ({
});

useEffect(() => {
actions.setSelectedItems(selectedItems);
actions.setSelectedItems(selectedItems || []);
}, [selectedItems, paginationProps.currentPageIndex, filterProps.filteringText]);

const collectionPropsOnSelectionChange = collectionProps.onSelectionChange;
Expand All @@ -95,7 +95,7 @@ const FullDataTable: FC<TableProps & InternalTableProps> = ({
<TableComponent
trackBy={trackBy}
loadingText={DEFAULT_LOADING_TEXT}
visibleColumns={collectionPreferences.visibleContent}
columnDisplay={collectionPreferences.contentDisplay}
wrapLines={collectionPreferences.wrapLines}
stripedRows={collectionPreferences.stripedRows}
{...props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ const ThreatPack: FC<ThreatPackProp> = ({
id: 'impactedGoal',
header: 'Impacted goal',
cell: (data) => (<TextContent>
<ul>{data.impactedGoal?.map(x => <li>{x}</li>)}</ul>
<ul>{data.impactedGoal?.map((x, index) => <li key={index}>{x}</li>)}</ul>
</TextContent>),
sortingField: 'impactedGoal',
},
{
id: 'impactedAssets',
header: 'Impacted assets',
cell: (data) => (<TextContent>
<ul>{data.impactedAssets?.map(x => <li>{x}</li>)}</ul>
<ul>{data.impactedAssets?.map((x, index) => <li key={index}>{x}</li>)}</ul>
</TextContent>),
sortingField: 'impactedAssets',
},
Expand Down

0 comments on commit 524556a

Please sign in to comment.