@izumisy-tailor/tailor-data-viewer 0.2.31 → 0.2.32
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.
package/package.json
CHANGED
|
@@ -116,7 +116,9 @@ describe("DataTable", () => {
|
|
|
116
116
|
</DataTableContext.Provider>,
|
|
117
117
|
);
|
|
118
118
|
|
|
119
|
-
expect(
|
|
119
|
+
expect(
|
|
120
|
+
document.querySelector('[data-datatable-state="loading"]'),
|
|
121
|
+
).toBeInTheDocument();
|
|
120
122
|
});
|
|
121
123
|
|
|
122
124
|
it("shows error state", () => {
|
|
@@ -130,7 +132,9 @@ describe("DataTable", () => {
|
|
|
130
132
|
</DataTableContext.Provider>,
|
|
131
133
|
);
|
|
132
134
|
|
|
133
|
-
expect(
|
|
135
|
+
expect(
|
|
136
|
+
document.querySelector('[data-datatable-state="error"]'),
|
|
137
|
+
).toBeInTheDocument();
|
|
134
138
|
});
|
|
135
139
|
|
|
136
140
|
it("shows empty state", () => {
|
|
@@ -143,7 +147,9 @@ describe("DataTable", () => {
|
|
|
143
147
|
</DataTableContext.Provider>,
|
|
144
148
|
);
|
|
145
149
|
|
|
146
|
-
expect(
|
|
150
|
+
expect(
|
|
151
|
+
document.querySelector('[data-datatable-state="empty"]'),
|
|
152
|
+
).toBeInTheDocument();
|
|
147
153
|
});
|
|
148
154
|
|
|
149
155
|
it("renders sort indicator on sorted column", () => {
|
|
@@ -228,14 +228,14 @@ function DataTableBody({
|
|
|
228
228
|
{loading && (!rows || rows.length === 0) && (
|
|
229
229
|
<Table.Row>
|
|
230
230
|
<Table.Cell colSpan={totalColSpan} className="h-24 text-center">
|
|
231
|
-
<span className="text-muted-foreground">{labels.loading}</span>
|
|
231
|
+
<span className="text-muted-foreground" data-datatable-state="loading">{labels.loading}</span>
|
|
232
232
|
</Table.Cell>
|
|
233
233
|
</Table.Row>
|
|
234
234
|
)}
|
|
235
235
|
{error && (
|
|
236
236
|
<Table.Row>
|
|
237
237
|
<Table.Cell colSpan={totalColSpan} className="h-24 text-center">
|
|
238
|
-
<span className="text-destructive">
|
|
238
|
+
<span className="text-destructive" data-datatable-state="error">
|
|
239
239
|
{labels.errorPrefix} {error.message}
|
|
240
240
|
</span>
|
|
241
241
|
</Table.Cell>
|
|
@@ -244,7 +244,7 @@ function DataTableBody({
|
|
|
244
244
|
{!loading && !error && (!rows || rows.length === 0) && (
|
|
245
245
|
<Table.Row>
|
|
246
246
|
<Table.Cell colSpan={totalColSpan} className="h-24 text-center">
|
|
247
|
-
<span className="text-muted-foreground">{labels.noData}</span>
|
|
247
|
+
<span className="text-muted-foreground" data-datatable-state="empty">{labels.noData}</span>
|
|
248
248
|
</Table.Cell>
|
|
249
249
|
</Table.Row>
|
|
250
250
|
)}
|