@juspay/svelte-ui-components 2.81.0 → 2.81.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -244,6 +244,7 @@
|
|
|
244
244
|
placeholder={selectData.placeholder ?? ''}
|
|
245
245
|
disabled={selectData.disabled ?? false}
|
|
246
246
|
testId={selectData.testId}
|
|
247
|
+
itemTestId={selectData.itemTestId}
|
|
247
248
|
onchange={(selectedIds) => {
|
|
248
249
|
if (selectedIds.length > 0) {
|
|
249
250
|
column.onSelect?.(rowIndex, selectedIds[0]);
|
package/dist/Table/cellData.js
CHANGED
|
@@ -134,6 +134,9 @@ export const asSelectCellData = (value) => {
|
|
|
134
134
|
if (typeof record.testId === 'string') {
|
|
135
135
|
selectData.testId = record.testId;
|
|
136
136
|
}
|
|
137
|
+
if (typeof record.itemTestId === 'string') {
|
|
138
|
+
selectData.itemTestId = record.itemTestId;
|
|
139
|
+
}
|
|
137
140
|
return selectData;
|
|
138
141
|
};
|
|
139
142
|
export const asInputCellData = (value) => {
|
|
@@ -97,6 +97,8 @@ export type TableSelectCellData = {
|
|
|
97
97
|
placeholder?: string;
|
|
98
98
|
disabled?: boolean;
|
|
99
99
|
testId?: string;
|
|
100
|
+
/** Per-option test id prefix — each option emits `data-pw="{itemTestId}-{id}"`. */
|
|
101
|
+
itemTestId?: string;
|
|
100
102
|
};
|
|
101
103
|
/** Cell shape for `type: 'input'` — the handler lives on the column. */
|
|
102
104
|
export type TableInputCellData = {
|