@dloizides/ui-tables 1.14.0 → 1.15.0

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/dist/index.mjs CHANGED
@@ -860,8 +860,9 @@ function DataTable(props) {
860
860
  );
861
861
  const rowBg = (row, index, key) => interactive && hoveredKey === key ? hoverTint : rowBackground(row, index);
862
862
  const stateView = (label) => /* @__PURE__ */ jsx(View, { style: [tableStyles.wrap, frame, o?.wrap], testID, children: /* @__PURE__ */ jsx(View, { style: [tableStyles.state, o?.state], children: /* @__PURE__ */ jsx(Text, { style: [tableStyles.stateText, { color: colors.textSecondary }, o?.stateText], children: label }) }) });
863
- if (loading) return stateView(loadingLabel ?? t(TABLE_I18N.loading));
864
- if (rows.length === 0) return stateView(emptyLabel ?? t(TABLE_I18N.empty));
863
+ if (rows.length === 0) {
864
+ return stateView(loading ? loadingLabel ?? t(TABLE_I18N.loading) : emptyLabel ?? t(TABLE_I18N.empty));
865
+ }
865
866
  const renderRow = (row, key, style) => /* @__PURE__ */ jsx(
866
867
  DataTableRow,
867
868
  {
@@ -897,7 +898,7 @@ function DataTable(props) {
897
898
  }
898
899
  );
899
900
  if (stacked) {
900
- return /* @__PURE__ */ jsxs(View, { style: [tableStyles.wrap, frame, o?.wrap], testID, children: [
901
+ return /* @__PURE__ */ jsxs(View, { style: [tableStyles.wrap, frame, o?.wrap], testID, "aria-busy": loading, children: [
901
902
  banner,
902
903
  rows.map((row, i) => {
903
904
  const key = rowKeys[i] ?? keyExtractor(row);
@@ -919,6 +920,7 @@ function DataTable(props) {
919
920
  {
920
921
  style: [tableStyles.wrap, frame, o?.wrap],
921
922
  testID,
923
+ "aria-busy": loading,
922
924
  ...keyboardNavigation ? { role: "grid" } : null,
923
925
  children: [
924
926
  banner,