@pdg/react-table 1.0.15 → 1.0.16

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.
@@ -17,6 +17,7 @@ export interface SearchTableTableProps<T = TableItem> extends Omit<TableProps<T>
17
17
  export interface SearchTableProps extends CommonSxProps {
18
18
  color?: SearchProps['color'];
19
19
  hash?: boolean;
20
+ stickyHeader?: boolean;
20
21
  fullHeight?: boolean;
21
22
  search?: SearchTableSearchProps;
22
23
  table: SearchTableTableProps;
package/dist/index.esm.js CHANGED
@@ -8891,7 +8891,8 @@ var Table = React__default.forwardRef(function (_a, ref) {
8891
8891
  });
8892
8892
  Table.displayName = 'Table';
8893
8893
  Table.defaultProps = TableDefaultProps;var SearchTableDefaultProps = {};var SearchTable = React__default.forwardRef(function (_a, ref) {
8894
- var color = _a.color, hash = _a.hash, fullHeight = _a.fullHeight, search = _a.search, table = _a.table, betweenSearchTableComponent = _a.betweenSearchTableComponent, onGetData = _a.onGetData, onRequestHashChange = _a.onRequestHashChange,
8894
+ var _b, _c;
8895
+ var color = _a.color, hash = _a.hash, stickyHeader = _a.stickyHeader, fullHeight = _a.fullHeight, search = _a.search, table = _a.table, betweenSearchTableComponent = _a.betweenSearchTableComponent, onGetData = _a.onGetData, onRequestHashChange = _a.onRequestHashChange,
8895
8896
  // ---------------------------------------------------------------------------------------------------------------
8896
8897
  className = _a.className, initStyle = _a.style, sx = _a.sx;
8897
8898
  var searchRef = useRef();
@@ -8919,11 +8920,11 @@ Table.defaultProps = TableDefaultProps;var SearchTableDefaultProps = {};var Sear
8919
8920
  // Ref -------------------------------------------------------------------------------------------------------------
8920
8921
  var lastGetDataDataRef = useRef({});
8921
8922
  // State -----------------------------------------------------------------------------------------------------------
8922
- var _b = useState(true), isFirstSearchSubmit = _b[0], setIsFirstSearchSubmit = _b[1];
8923
- var _c = useState(), tableData = _c[0], setTableData = _c[1];
8923
+ var _d = useState(true), isFirstSearchSubmit = _d[0], setIsFirstSearchSubmit = _d[1];
8924
+ var _e = useState(), tableData = _e[0], setTableData = _e[1];
8924
8925
  // searchInfo ------------------------------------------------------------------------------------------------------
8925
8926
  var searchInfoFirstUseEffect = useRef(true);
8926
- var _d = useState(function () { return getSearchInfo(search); }), searchInfo = _d[0], setSearchInfo = _d[1];
8927
+ var _f = useState(function () { return getSearchInfo(search); }), searchInfo = _f[0], setSearchInfo = _f[1];
8927
8928
  useEffect(function () {
8928
8929
  if (searchInfoFirstUseEffect.current) {
8929
8930
  searchInfoFirstUseEffect.current = false;
@@ -8935,7 +8936,7 @@ Table.defaultProps = TableDefaultProps;var SearchTableDefaultProps = {};var Sear
8935
8936
  }, [search]);
8936
8937
  // tableInfo -------------------------------------------------------------------------------------------------------
8937
8938
  var tableInfoFirstUseEffect = useRef(true);
8938
- var _e = useState(function () { return getTableInfo(table); }), tableInfo = _e[0], setTableInfo = _e[1];
8939
+ var _g = useState(function () { return getTableInfo(table); }), tableInfo = _g[0], setTableInfo = _g[1];
8939
8940
  useEffect(function () {
8940
8941
  if (tableInfoFirstUseEffect.current) {
8941
8942
  tableInfoFirstUseEffect.current = false;
@@ -9207,7 +9208,7 @@ Table.defaultProps = TableDefaultProps;var SearchTableDefaultProps = {};var Sear
9207
9208
  searchInfo.searchGroups)),
9208
9209
  betweenSearchTableComponent && React__default.createElement(Grid, { item: true }, betweenSearchTableComponent),
9209
9210
  React__default.createElement(Grid, { item: true, style: tableContainerStyle },
9210
- React__default.createElement(Table, __assign$1({}, tableInfo.props, { fullHeight: fullHeight, ref: function (commands) {
9211
+ React__default.createElement(Table, __assign$1({}, tableInfo.props, { stickyHeader: stickyHeader || ((_b = tableInfo.props) === null || _b === void 0 ? void 0 : _b.stickyHeader), fullHeight: fullHeight || ((_c = tableInfo.props) === null || _c === void 0 ? void 0 : _c.fullHeight), ref: function (commands) {
9211
9212
  if (tableInfo.ref) {
9212
9213
  if (typeof tableInfo.ref === 'function') {
9213
9214
  tableInfo.ref(commands);