File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/Shared/Components/DynamicDataTable Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export const DynamicDataTableHeader = <K extends string, CustomStateType = Recor
27
27
headers,
28
28
rows,
29
29
sortingConfig,
30
+ addBtnTooltip,
30
31
onRowAdd,
31
32
readOnly,
32
33
isAdditionNotAllowed,
@@ -89,12 +90,11 @@ export const DynamicDataTableHeader = <K extends string, CustomStateType = Recor
89
90
{ shouldRenderAddRowButton && (
90
91
< Button
91
92
dataTestId = "data-table-add-row-button"
92
- ariaLabel = "Add"
93
+ ariaLabel = { addBtnTooltip }
93
94
onClick = { onRowAdd }
94
95
icon = { < ICAdd /> }
95
96
variant = { ButtonVariantType . borderLess }
96
97
size = { ComponentSizeType . xs }
97
- showAriaLabelInTippy = { false }
98
98
/>
99
99
) }
100
100
{ key === lastHeaderKey && headerComponent }
Original file line number Diff line number Diff line change @@ -169,6 +169,10 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
169
169
isDeletionNotAllowed ?: boolean
170
170
/** When true, data add or update is disabled. */
171
171
readOnly ?: boolean
172
+ /** Tooltip for add button.
173
+ * @default 'Add'
174
+ */
175
+ addBtnTooltip ?: string
172
176
/** Function to handle the addition of a new row to the table. */
173
177
onRowAdd : ( ) => void
174
178
/**
@@ -233,6 +237,7 @@ export interface DynamicDataTableHeaderProps<K extends string, CustomStateType =
233
237
| 'rows'
234
238
| 'headerComponent'
235
239
| 'sortingConfig'
240
+ | 'addBtnTooltip'
236
241
| 'onRowAdd'
237
242
| 'readOnly'
238
243
| 'isAdditionNotAllowed'
You can’t perform that action at this time.
0 commit comments