@vuu-ui/vuu-table-extras 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
@@ -1721,14 +1721,13 @@ var useTableContextMenu = ({
1721
1721
  const [showContextMenu] = (0, import_vuu_popups2.useContextMenu)();
1722
1722
  const onContextMenu = (0, import_react18.useCallback)(
1723
1723
  (evt) => {
1724
- var _a;
1725
1724
  const target = evt.target;
1726
1725
  const cellEl = target == null ? void 0 : target.closest("div[role='cell']");
1727
1726
  const rowEl = target == null ? void 0 : target.closest("div[role='row']");
1728
1727
  if (cellEl && rowEl) {
1729
1728
  const { selectedRowsCount } = dataSource;
1730
1729
  const columnMap = (0, import_vuu_utils15.buildColumnMap)(columns);
1731
- const rowIndex = parseInt((_a = rowEl.ariaRowIndex) != null ? _a : "-1");
1730
+ const rowIndex = (0, import_vuu_utils15.getIndexFromRowElement)(rowEl);
1732
1731
  const cellIndex = Array.from(rowEl.childNodes).indexOf(cellEl);
1733
1732
  const row = data.find(([idx]) => idx === rowIndex);
1734
1733
  const columnName = columns[cellIndex];
@@ -2972,14 +2971,11 @@ var useTable = ({
2972
2971
  const handleDragStartRow = (0, import_react24.useCallback)(
2973
2972
  (dragDropState) => {
2974
2973
  const { initialDragElement } = dragDropState;
2975
- const rowIndex = initialDragElement.ariaRowIndex;
2976
- if (rowIndex) {
2977
- const index = parseInt(rowIndex);
2978
- const row = dataRef.current.find((row2) => row2[0] === index);
2979
- if (row) {
2980
- dragDropState.setPayload(row);
2981
- } else {
2982
- }
2974
+ const rowIndex = (0, import_vuu_utils19.getIndexFromRowElement)(initialDragElement);
2975
+ const row = dataRef.current.find((row2) => row2[0] === rowIndex);
2976
+ if (row) {
2977
+ dragDropState.setPayload(row);
2978
+ } else {
2983
2979
  }
2984
2980
  onDragStart == null ? void 0 : onDragStart(dragDropState);
2985
2981
  },
@@ -2997,6 +2993,7 @@ var useTable = ({
2997
2993
  });
2998
2994
  return {
2999
2995
  ...containerProps,
2996
+ "aria-rowcount": dataSource.size,
3000
2997
  draggableRow,
3001
2998
  onBlur: editingBlur,
3002
2999
  onDoubleClick: editingDoubleClick,