@symply.io/basic-components 1.7.9 → 1.7.10-alpha.1

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.
@@ -31,9 +31,15 @@ import TableContainer from "@mui/material/TableContainer";
31
31
  import Typography from "@mui/material/Typography";
32
32
  import useInteractions from "./useInteractions";
33
33
  var VirtualDataTable = function (props, ref) {
34
- var aux = props.aux, rows = props.rows, columns = props.columns, dense = props.dense, height = props.height, _a = props.noDataText, noDataText = _a === void 0 ? "No Data" : _a, headerBgColor = props.headerBgColor, headerTextColor = props.headerTextColor, footerBgColor = props.footerBgColor, footerTextColor = props.footerTextColor, sortingDisabled = props.sortingDisabled, initialState = props.initialState, onSort = props.onSort, onRowClick = props.onRowClick, onContextMenu = props.onContextMenu, onCustomizeRowBgColor = props.onCustomizeRowBgColor;
34
+ var aux = props.aux, rows = props.rows, columns = props.columns, dense = props.dense, height = props.height, visableRows = props.visableRows, _a = props.noDataText, noDataText = _a === void 0 ? "No Data" : _a, headerBgColor = props.headerBgColor, headerTextColor = props.headerTextColor, footerBgColor = props.footerBgColor, footerTextColor = props.footerTextColor, sortingDisabled = props.sortingDisabled, initialState = props.initialState, onSort = props.onSort, onRowClick = props.onRowClick, onContextMenu = props.onContextMenu, onCustomizeRowBgColor = props.onCustomizeRowBgColor;
35
35
  var _b = useState(null), rowDataIndex = _b[0], setRowDataIndex = _b[1];
36
- var _c = useInteractions({ rows: rows, columns: columns, initialState: initialState, sortingDisabled: sortingDisabled, onSort: onSort }), normalCols = _c.normalCols, pinnedLeftCols = _c.pinnedLeftCols, pinnedRightCols = _c.pinnedRightCols, leftShadowVisible = _c.leftShadowVisible, rightShadowVisible = _c.rightShadowVisible, onScroll = _c.onScroll, handleSort = _c.handleSort, onResetSorting = _c.onResetSorting, reflectScrollerRef = _c.reflectScrollerRef, renderSortingSymbol = _c.renderSortingSymbol;
36
+ var _c = useInteractions({
37
+ rows: visableRows || rows,
38
+ columns: columns,
39
+ initialState: initialState,
40
+ sortingDisabled: sortingDisabled,
41
+ onSort: onSort,
42
+ }), normalCols = _c.normalCols, pinnedLeftCols = _c.pinnedLeftCols, pinnedRightCols = _c.pinnedRightCols, leftShadowVisible = _c.leftShadowVisible, rightShadowVisible = _c.rightShadowVisible, onScroll = _c.onScroll, handleSort = _c.handleSort, onResetSorting = _c.onResetSorting, reflectScrollerRef = _c.reflectScrollerRef, renderSortingSymbol = _c.renderSortingSymbol;
37
43
  useImperativeHandle(ref, function () { return ({
38
44
  onResetSorting: onResetSorting,
39
45
  }); }, [onResetSorting]);
@@ -349,6 +355,6 @@ var VirtualDataTable = function (props, ref) {
349
355
  TableBody: forwardRef(function (props, ref) { return (_jsx(TableBody, __assign({}, props, { ref: ref }))); }),
350
356
  TableFoot: forwardRef(function (props, ref) { return (_jsx(TableFooter, __assign({}, props, { ref: ref }))); }),
351
357
  }); }, [onRowClick, onContextMenu, handleCustomizeRowBgColor]);
352
- return (_jsx(TableVirtuoso, { data: rows, increaseViewportBy: { top: 320, bottom: 480 }, initialTopMostItemIndex: 0, style: { height: height }, onScroll: onScroll, onResize: onScroll, components: VirtuosoTableComponents, fixedHeaderContent: fixedHeaderContent, fixedFooterContent: fixedFooterContent, itemContent: itemContent, scrollerRef: reflectScrollerRef }));
358
+ return (_jsx(TableVirtuoso, { data: visableRows || rows, increaseViewportBy: { top: 320, bottom: 480 }, initialTopMostItemIndex: 0, style: { height: height }, onScroll: onScroll, onResize: onScroll, components: VirtuosoTableComponents, fixedHeaderContent: fixedHeaderContent, fixedFooterContent: fixedFooterContent, itemContent: itemContent, scrollerRef: reflectScrollerRef }));
353
359
  };
354
360
  export default forwardRef(VirtualDataTable);
@@ -34,6 +34,7 @@ export interface InteractionProps<RowProps extends TVirtualTableRow> {
34
34
  }
35
35
  export interface VirtualTableProps<RowProps extends TVirtualTableRow, AuxProps extends TVirtualTableAuxiliary> extends InteractionProps<RowProps> {
36
36
  dense?: boolean;
37
+ visableRows?: Array<RowProps>;
37
38
  height: number;
38
39
  headerBgColor?: CSSProperties["color"];
39
40
  headerTextColor?: CSSProperties["color"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.7.9",
3
+ "version": "1.7.10-alpha.1",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",
@@ -59,7 +59,7 @@
59
59
  "color-alpha": "^1.1.3",
60
60
  "react-dropzone": "14.2.3",
61
61
  "react-player": "2.11.0",
62
- "react-virtuoso": "4.12.3",
62
+ "react-virtuoso": "4.12.8",
63
63
  "rifm": "^0.12.1"
64
64
  },
65
65
  "resolutions": {