File tree Expand file tree Collapse file tree
src/Shared/Components/DynamicDataTable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export const DynamicDataTableHeader = <K extends string, CustomStateType = Recor
2727 headers,
2828 rows,
2929 sortingConfig,
30+ addBtnTooltip,
3031 onRowAdd,
3132 readOnly,
3233 isAdditionNotAllowed,
@@ -89,12 +90,11 @@ export const DynamicDataTableHeader = <K extends string, CustomStateType = Recor
8990 { shouldRenderAddRowButton && (
9091 < Button
9192 dataTestId = "data-table-add-row-button"
92- ariaLabel = "Add"
93+ ariaLabel = { addBtnTooltip }
9394 onClick = { onRowAdd }
9495 icon = { < ICAdd /> }
9596 variant = { ButtonVariantType . borderLess }
9697 size = { ComponentSizeType . xs }
97- showAriaLabelInTippy = { false }
9898 />
9999 ) }
100100 { 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
169169 isDeletionNotAllowed ?: boolean
170170 /** When true, data add or update is disabled. */
171171 readOnly ?: boolean
172+ /** Tooltip for add button.
173+ * @default 'Add'
174+ */
175+ addBtnTooltip ?: string
172176 /** Function to handle the addition of a new row to the table. */
173177 onRowAdd : ( ) => void
174178 /**
@@ -233,6 +237,7 @@ export interface DynamicDataTableHeaderProps<K extends string, CustomStateType =
233237 | 'rows'
234238 | 'headerComponent'
235239 | 'sortingConfig'
240+ | 'addBtnTooltip'
236241 | 'onRowAdd'
237242 | 'readOnly'
238243 | 'isAdditionNotAllowed'
You can’t perform that action at this time.
0 commit comments