@nextelco/common-ui 2.1.100 → 2.1.102

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.
@@ -127,6 +127,7 @@ function DataTable({
127
127
  onRowClick,
128
128
  onRowDoubleClick,
129
129
  rowClassName,
130
+ onVisibleRowsChange,
130
131
  isLoading,
131
132
  isError,
132
133
  maxHeight = "70vh",
@@ -400,6 +401,11 @@ function DataTable({
400
401
  // eslint-disable-next-line react-hooks/exhaustive-deps
401
402
  [filtered, sort, columns]
402
403
  );
404
+ const avisarVisiveis = useRef(onVisibleRowsChange);
405
+ avisarVisiveis.current = onVisibleRowsChange;
406
+ useEffect(() => {
407
+ avisarVisiveis.current?.(sorted);
408
+ }, [sorted]);
403
409
  const alternarGrupo = (key) => {
404
410
  if (!allData) onDataNeeded?.();
405
411
  setGroupByKeys((prev) => prev.includes(key) ? prev.filter((k) => k !== key) : [...prev, key]);