Skip to content

Commit

Permalink
Merge pull request #2861 from mi6/cherry-pick-data-table-contribution
Browse files Browse the repository at this point in the history
Cherry-pick-data-table-contribution
  • Loading branch information
GCHQ-Developer-112 authored Dec 4, 2024
2 parents faf340c + a85e4d6 commit f5f47c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/canary-docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@
"type": "IcDataTableDataType[]"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/canary-web-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export namespace Components {
/**
* The row content for the table.
*/
"data": IcDataTableDataType[];
"data"?: IcDataTableDataType[];
/**
* Set the density of the table including font and padding.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class DataTable {
/**
* The row content for the table.
*/
@Prop() data: IcDataTableDataType[];
@Prop() data?: IcDataTableDataType[];

/**
* Set the density of the table including font and padding.
Expand Down Expand Up @@ -1917,7 +1917,7 @@ export class DataTable {
<slot name="pagination-bar" />
) : (
<ic-pagination-bar
totalItems={data.length}
totalItems={data?.length ?? 0}
type={paginationBarOptions.type}
rangeLabelType={paginationBarOptions.rangeLabelType}
showItemsPerPageControl={
Expand Down

0 comments on commit f5f47c8

Please sign in to comment.