@symply.io/basic-components 1.7.10-beta.2 → 1.7.10-beta.3

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/README.md CHANGED
@@ -1006,24 +1006,26 @@ import VirtualDataTable from '@symply.io/basic-components/VirtualDataTable';
1006
1006
 
1007
1007
  <h5>Component Props</h5>
1008
1008
 
1009
- | Name | Type | Default | Required | Description |
1010
- | --------------------- | -------------------------- | ---------- | -------- | ------------------------------------------------------------ |
1011
- | aux | {[name:string]: any} | | false | Extra properties |
1012
- | columns | Array | [] | true | Table columns |
1013
- | dense | bool | | false | If `true` the table size/density would be tight. |
1014
- | footerBgColor | CSSProperties["color"] | | false | Customized footer background color. |
1015
- | footerTextColor | CSSProperties["color"] | | false | Customized footer text color. |
1016
- | | | | | |
1017
- | headerBgColor | CSSProperties["color"] | | false | Customized header background color. |
1018
- | headerTextColor | CSSProperties["color"] | | false | Customized header text color. |
1019
- | initialState | { sortBy?: SortingProps} | | false | Set the initial states |
1020
- | noDataText | string | 'No Data!' | false | The text when no data rendered. |
1021
- | onContextMenu | func | | false | The function for row right-clicking.<br />**Signature:**<br/>`function(event: MouseEvent, row: RowProps) => unknown` |
1022
- | onCustomizeRowBgColor | func | | false | The function for customizing the row background color.<br />**Signature:**<br/>`function(props: {row: RowProps, columns: Array\<ColumnProps\>}) => {normal?: HexColor;<br/> hover?: HexColor;<br/>}` |
1023
- | onRowClick | func | | false | The function for row clicking.<br />**Signature:**<br/>`function(row: RowProps) => unknown` |
1024
- | onSort | func | | false | The function for sorting rows.<br />**Signature:**<br/>`function(props: SortingProps) => unknown` |
1025
- | rows | Array<{ [name]: unknown }> | | true | table data/rows |
1026
- | sortingDisabled | bool | | false | If true, the whole table can't be sortable. |
1009
+ | Name | Type | Default | Required | Description |
1010
+ | --------------------- | -------------------------- | -------------- | -------- | ------------------------------------------------------------ |
1011
+ | aux | {[name:string]: any} | | false | Extra properties |
1012
+ | columns | Array | [] | true | Table columns |
1013
+ | dense | bool | | false | If `true` the table size/density would be tight. |
1014
+ | footerBgColor | CSSProperties["color"] | | false | Customized footer background color. |
1015
+ | footerTextColor | CSSProperties["color"] | | false | Customized footer text color. |
1016
+ | | | | | |
1017
+ | headerBgColor | CSSProperties["color"] | | false | Customized header background color. |
1018
+ | headerTextColor | CSSProperties["color"] | | false | Customized header text color. |
1019
+ | initialState | { sortBy?: SortingProps} | | false | Set the initial states |
1020
+ | maxHeight | number | | false | The max height (px) of the table container. |
1021
+ | noDataText | string | 'No Data!' | false | The text when no data rendered. |
1022
+ | onContextMenu | func | | false | The function for row right-clicking.<br />**Signature:**<br/>`function(event: MouseEvent, row: RowProps) => unknown` |
1023
+ | onCustomizeRowBgColor | func | | false | The function for customizing the row background color.<br />**Signature:**<br/>`function(props: {row: RowProps, columns: Array\<ColumnProps\>}) => {normal?: HexColor;<br/> hover?: HexColor;<br/>}` |
1024
+ | onRowClick | func | | false | The function for row clicking.<br />**Signature:**<br/>`function(row: RowProps) => unknown` |
1025
+ | onSort | func | | false | The function for sorting rows.<br />**Signature:**<br/>`function(props: SortingProps) => unknown` |
1026
+ | rows | Array<{ [name]: unknown }> | | true | Table data/rows. |
1027
+ | sortingDisabled | bool | | false | If true, the whole table can't be sortable. |
1028
+ | visibleRows | Array<{ [name]: unknown }> | same as `rows` | false | The table will only display these rows, and it won't affect the table data, especially some totals in the footer (if you defined them). |
1027
1029
 
1028
1030
 
1029
1031
 
@@ -355,6 +355,10 @@ var VirtualDataTable = function (props, ref) {
355
355
  TableBody: forwardRef(function (props, ref) { return (_jsx(TableBody, __assign({}, props, { ref: ref }))); }),
356
356
  TableFoot: forwardRef(function (props, ref) { return (_jsx(TableFooter, __assign({}, props, { ref: ref }))); }),
357
357
  }); }, [onRowClick, onContextMenu, handleCustomizeRowBgColor]);
358
- return (_jsx(TableVirtuoso, { data: visableRows || rows, increaseViewportBy: { top: 320, bottom: 480 }, initialTopMostItemIndex: 0, style: { height: tableHeight, minHeight: 112, maxHeight: maxHeight }, onScroll: onScroll, onResize: onScroll, components: VirtuosoTableComponents, fixedHeaderContent: fixedHeaderContent, fixedFooterContent: fixedFooterContent, itemContent: itemContent, scrollerRef: reflectScrollerRef, totalListHeightChanged: onTotalListHeightChanged }));
358
+ return (_jsx(TableVirtuoso, { data: visableRows || rows, increaseViewportBy: { top: 320, bottom: 480 }, initialTopMostItemIndex: 0, style: {
359
+ height: tableHeight,
360
+ minHeight: rows.length > 0 ? tableHeight + 34 : undefined,
361
+ maxHeight: maxHeight,
362
+ }, onScroll: onScroll, onResize: onScroll, components: VirtuosoTableComponents, fixedHeaderContent: fixedHeaderContent, fixedFooterContent: fixedFooterContent, itemContent: itemContent, scrollerRef: reflectScrollerRef, totalListHeightChanged: onTotalListHeightChanged }));
359
363
  };
360
364
  export default forwardRef(VirtualDataTable);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.7.10-beta.2",
3
+ "version": "1.7.10-beta.3",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",