@vuu-ui/vuu-table 0.8.18-debug → 0.8.19-debug

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/cjs/index.js CHANGED
@@ -1652,14 +1652,13 @@ var useTableContextMenu = ({
1652
1652
  const [showContextMenu] = (0, import_vuu_popups2.useContextMenu)();
1653
1653
  const onContextMenu = (0, import_react18.useCallback)(
1654
1654
  (evt) => {
1655
- var _a;
1656
1655
  const target = evt.target;
1657
1656
  const cellEl = target == null ? void 0 : target.closest("div[role='cell']");
1658
1657
  const rowEl = target == null ? void 0 : target.closest("div[role='row']");
1659
1658
  if (cellEl && rowEl) {
1660
1659
  const { selectedRowsCount } = dataSource;
1661
1660
  const columnMap = (0, import_vuu_utils13.buildColumnMap)(columns);
1662
- const rowIndex = parseInt((_a = rowEl.ariaRowIndex) != null ? _a : "-1");
1661
+ const rowIndex = (0, import_vuu_utils13.getIndexFromRowElement)(rowEl);
1663
1662
  const cellIndex = Array.from(rowEl.childNodes).indexOf(cellEl);
1664
1663
  const row = data.find(([idx]) => idx === rowIndex);
1665
1664
  const columnName = columns[cellIndex];
@@ -2903,14 +2902,11 @@ var useTable = ({
2903
2902
  const handleDragStartRow = (0, import_react24.useCallback)(
2904
2903
  (dragDropState) => {
2905
2904
  const { initialDragElement } = dragDropState;
2906
- const rowIndex = initialDragElement.ariaRowIndex;
2907
- if (rowIndex) {
2908
- const index = parseInt(rowIndex);
2909
- const row = dataRef.current.find((row2) => row2[0] === index);
2910
- if (row) {
2911
- dragDropState.setPayload(row);
2912
- } else {
2913
- }
2905
+ const rowIndex = (0, import_vuu_utils17.getIndexFromRowElement)(initialDragElement);
2906
+ const row = dataRef.current.find((row2) => row2[0] === rowIndex);
2907
+ if (row) {
2908
+ dragDropState.setPayload(row);
2909
+ } else {
2914
2910
  }
2915
2911
  onDragStart == null ? void 0 : onDragStart(dragDropState);
2916
2912
  },
@@ -2928,6 +2924,7 @@ var useTable = ({
2928
2924
  });
2929
2925
  return {
2930
2926
  ...containerProps,
2927
+ "aria-rowcount": dataSource.size,
2931
2928
  draggableRow,
2932
2929
  onBlur: editingBlur,
2933
2930
  onDoubleClick: editingDoubleClick,