@vuu-ui/vuu-table 0.8.25-debug → 0.8.26-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/esm/index.js CHANGED
@@ -1712,6 +1712,7 @@ var useKeyboardNavigation = ({
1712
1712
  import {
1713
1713
  deselectItem,
1714
1714
  dispatchMouseEvent,
1715
+ getRowElementAtIndex,
1715
1716
  isRowSelected,
1716
1717
  metadataKeys as metadataKeys4,
1717
1718
  selectItem
@@ -1753,7 +1754,7 @@ var useSelection = ({
1753
1754
  );
1754
1755
  selectedRef.current = newSelected;
1755
1756
  lastActiveRef.current = idx;
1756
- onSelect == null ? void 0 : onSelect(row);
1757
+ onSelect == null ? void 0 : onSelect(selectOperation === selectItem ? row : null);
1757
1758
  onSelectionChange == null ? void 0 : onSelectionChange(newSelected);
1758
1759
  },
1759
1760
  [onSelect, onSelectionChange, selectionModel]
@@ -1763,9 +1764,7 @@ var useSelection = ({
1763
1764
  if (isSelectionEvent(e)) {
1764
1765
  const { current: rowIndex } = highlightedIndexRef;
1765
1766
  if (rowIndex !== void 0 && rowIndex !== -1) {
1766
- const rowEl = e.target.querySelector(
1767
- `[aria-rowindex="${rowIndex}"]`
1768
- );
1767
+ const rowEl = getRowElementAtIndex(e.target, rowIndex);
1769
1768
  if (rowEl) {
1770
1769
  dispatchMouseEvent(rowEl, "click");
1771
1770
  }
@@ -2127,7 +2126,7 @@ function updateTableConfig2(state, { confirmed, filter, groupBy, sort }) {
2127
2126
  // src/useTableScroll.ts
2128
2127
  import {
2129
2128
  getColumnsInViewport,
2130
- getRowElementAtIndex,
2129
+ getRowElementAtIndex as getRowElementAtIndex2,
2131
2130
  itemsChanged
2132
2131
  } from "@vuu-ui/vuu-utils";
2133
2132
  import {
@@ -2390,7 +2389,7 @@ var useTableScroll = ({
2390
2389
  const { scrollLeft, scrollTop } = contentContainer;
2391
2390
  contentContainerScrolledRef.current = false;
2392
2391
  if (scrollRequest.type === "scroll-row") {
2393
- const activeRow = getRowElementAtIndex(
2392
+ const activeRow = getRowElementAtIndex2(
2394
2393
  contentContainer,
2395
2394
  scrollRequest.rowIndex
2396
2395
  );