qbs-react-grid 1.1.8 → 1.1.10

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/es/Table.js CHANGED
@@ -620,7 +620,8 @@ var Table = /*#__PURE__*/React.forwardRef(function (props, ref) {
620
620
  var bodyStyles = {
621
621
  top: headerHeight,
622
622
  height: bodyHeight,
623
- maxHeight: tableBodyHeight,
623
+ //height: tableBodyHeight
624
+ // maxHeight: tableBodyHeight,
624
625
  minHeight: tableBodyHeight
625
626
  };
626
627
  var contentHeight = 0;
@@ -722,7 +723,8 @@ var Table = /*#__PURE__*/React.forwardRef(function (props, ref) {
722
723
  var wheelStyles = {
723
724
  position: 'absolute',
724
725
  height: contentHeight,
725
- minHeight: height,
726
+ minHeight: tableBodyHeight,
727
+ maxHeight: tableBodyHeight,
726
728
  pointerEvents: isScrolling ? 'none' : undefined
727
729
  };
728
730
  var topRowStyles = {
@@ -752,7 +754,7 @@ var Table = /*#__PURE__*/React.forwardRef(function (props, ref) {
752
754
  renderEmpty: renderEmpty,
753
755
  addPrefix: prefix,
754
756
  loading: !!((_visibleRows$current = visibleRows.current) !== null && _visibleRows$current !== void 0 && _visibleRows$current.length) || loading
755
- }), renderScrollbar(), /*#__PURE__*/React.createElement(Loader, {
757
+ }), /*#__PURE__*/React.createElement(Loader, {
756
758
  locale: locale,
757
759
  loadAnimation: loadAnimation,
758
760
  loading: loading,
@@ -783,7 +785,7 @@ var Table = /*#__PURE__*/React.forwardRef(function (props, ref) {
783
785
  className: classes,
784
786
  style: styles,
785
787
  ref: tableRef
786
- }), showHeader && renderTableHeader(headerCells, rowWidth), children && renderTableBody(bodyCells, rowWidth), showHeader && /*#__PURE__*/React.createElement(MouseArea, {
788
+ }), showHeader && renderTableHeader(headerCells, rowWidth), children && renderTableBody(bodyCells, rowWidth), renderScrollbar(), showHeader && /*#__PURE__*/React.createElement(MouseArea, {
787
789
  ref: mouseAreaRef,
788
790
  addPrefix: prefix,
789
791
  headerHeight: headerHeight,
@@ -136,6 +136,9 @@ var QbsTable = function QbsTable(_ref) {
136
136
  }) : col;
137
137
  });
138
138
  });
139
+ setTimeout(function () {
140
+ handleColumnsResizable();
141
+ }, 500);
139
142
  }, []);
140
143
  var handleColumnWidth = useCallback(function (newWidth, dataKey) {
141
144
  if (newWidth === undefined || dataKey === undefined) return;
package/lib/Table.js CHANGED
@@ -627,7 +627,8 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
627
627
  var bodyStyles = {
628
628
  top: headerHeight,
629
629
  height: bodyHeight,
630
- maxHeight: tableBodyHeight,
630
+ //height: tableBodyHeight
631
+ // maxHeight: tableBodyHeight,
631
632
  minHeight: tableBodyHeight
632
633
  };
633
634
  var contentHeight = 0;
@@ -729,7 +730,8 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
729
730
  var wheelStyles = {
730
731
  position: 'absolute',
731
732
  height: contentHeight,
732
- minHeight: height,
733
+ minHeight: tableBodyHeight,
734
+ maxHeight: tableBodyHeight,
733
735
  pointerEvents: isScrolling ? 'none' : undefined
734
736
  };
735
737
  var topRowStyles = {
@@ -759,7 +761,7 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
759
761
  renderEmpty: renderEmpty,
760
762
  addPrefix: prefix,
761
763
  loading: !!((_visibleRows$current = visibleRows.current) !== null && _visibleRows$current !== void 0 && _visibleRows$current.length) || loading
762
- }), renderScrollbar(), /*#__PURE__*/_react["default"].createElement(_Loader["default"], {
764
+ }), /*#__PURE__*/_react["default"].createElement(_Loader["default"], {
763
765
  locale: locale,
764
766
  loadAnimation: loadAnimation,
765
767
  loading: loading,
@@ -790,7 +792,7 @@ var Table = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
790
792
  className: classes,
791
793
  style: styles,
792
794
  ref: tableRef
793
- }), showHeader && renderTableHeader(headerCells, rowWidth), children && renderTableBody(bodyCells, rowWidth), showHeader && /*#__PURE__*/_react["default"].createElement(_MouseArea["default"], {
795
+ }), showHeader && renderTableHeader(headerCells, rowWidth), children && renderTableBody(bodyCells, rowWidth), renderScrollbar(), showHeader && /*#__PURE__*/_react["default"].createElement(_MouseArea["default"], {
794
796
  ref: mouseAreaRef,
795
797
  addPrefix: prefix,
796
798
  headerHeight: headerHeight,
@@ -143,6 +143,9 @@ var QbsTable = function QbsTable(_ref) {
143
143
  }) : col;
144
144
  });
145
145
  });
146
+ setTimeout(function () {
147
+ handleColumnsResizable();
148
+ }, 500);
146
149
  }, []);
147
150
  var handleColumnWidth = (0, _react.useCallback)(function (newWidth, dataKey) {
148
151
  if (newWidth === undefined || dataKey === undefined) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qbs-react-grid",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "A React table component",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
package/src/Table.tsx CHANGED
@@ -922,7 +922,9 @@ const Table = React.forwardRef(<Row extends RowDataType, Key>(props: TableProps<
922
922
  const bodyStyles = {
923
923
  top: headerHeight,
924
924
  height: bodyHeight,
925
- maxHeight: tableBodyHeight,
925
+
926
+ //height: tableBodyHeight
927
+ // maxHeight: tableBodyHeight,
926
928
  minHeight: tableBodyHeight
927
929
  };
928
930
 
@@ -1044,12 +1046,12 @@ const Table = React.forwardRef(<Row extends RowDataType, Key>(props: TableProps<
1044
1046
  const wheelStyles: React.CSSProperties = {
1045
1047
  position: 'absolute',
1046
1048
  height: contentHeight,
1047
- minHeight: height,
1049
+ minHeight: tableBodyHeight,
1050
+ maxHeight: tableBodyHeight,
1048
1051
  pointerEvents: isScrolling ? 'none' : undefined
1049
1052
  };
1050
1053
  const topRowStyles = { height: topHideHeight };
1051
1054
  const bottomRowStyles = { height: bottomHideHeight };
1052
-
1053
1055
  return (
1054
1056
  <div
1055
1057
  ref={tableBodyRef}
@@ -1070,7 +1072,7 @@ const Table = React.forwardRef(<Row extends RowDataType, Key>(props: TableProps<
1070
1072
  addPrefix={prefix}
1071
1073
  loading={!!visibleRows.current?.length || loading}
1072
1074
  />
1073
- {renderScrollbar()}
1075
+
1074
1076
  <Loader
1075
1077
  locale={locale}
1076
1078
  loadAnimation={loadAnimation}
@@ -1109,6 +1111,8 @@ const Table = React.forwardRef(<Row extends RowDataType, Key>(props: TableProps<
1109
1111
  >
1110
1112
  {showHeader && renderTableHeader(headerCells, rowWidth)}
1111
1113
  {children && renderTableBody(bodyCells, rowWidth)}
1114
+ {renderScrollbar()}
1115
+
1112
1116
  {showHeader && (
1113
1117
  <MouseArea
1114
1118
  ref={mouseAreaRef}
@@ -1118,7 +1122,6 @@ const Table = React.forwardRef(<Row extends RowDataType, Key>(props: TableProps<
1118
1122
  />
1119
1123
  )}
1120
1124
  </div>
1121
- {/* {pagination && <Pagination paginationProps={paginationProps} />} */}
1122
1125
  </TableContext.Provider>
1123
1126
  );
1124
1127
  });
@@ -122,6 +122,9 @@ const QbsTable: React.FC<QbsTableProps> = ({
122
122
  setColumns(cols =>
123
123
  cols.map(col => (col.title === columnName ? { ...col, isVisible: !col.isVisible } : col))
124
124
  );
125
+ setTimeout(() => {
126
+ handleColumnsResizable();
127
+ }, 500);
125
128
  }, []);
126
129
 
127
130
  const handleColumnWidth = useCallback((newWidth?: number, dataKey?: any) => {