Skip to content

Commit

Permalink
Updated types
Browse files Browse the repository at this point in the history
  • Loading branch information
tarashaidarTimechimp committed Apr 4, 2024
1 parent 6a4d4e7 commit 618199a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/data-grid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export const DataGrid = ({

const rowDataCopy = rowData?.map((item) => {
if (selectedGroupOption && item[selectedGroupOption.field] === EMPTY_GROUP) {
item[selectedGroupOption.field] = translations.emptyGroup[selectedGroupOption.field];
item[selectedGroupOption?.field] = translations?.emptyGroup[selectedGroupOption?.field];
return item;
} else {
return item;
Expand Down
6 changes: 5 additions & 1 deletion src/components/data-grid/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ export interface FormatSettings {
timeFormat?: string;
}

interface EmptyGroup {
[key: string]: string;
}

export interface Translations {
rowCountText: (count: number, totalCount: number) => JSX.Element;
rowCountSelectedText: (count: number) => JSX.Element;
Expand Down Expand Up @@ -187,7 +191,7 @@ export interface Translations {
none: string;
clearFilters: string;
add: string;
emptyGroup: { teamName: string };
emptyGroup: EmptyGroup;
}

export interface DataGridSetting {
Expand Down

0 comments on commit 618199a

Please sign in to comment.