sea-chart 1.1.45 → 1.1.47

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.
@@ -170,7 +170,6 @@ class RowCard extends Component {
170
170
  highlightRowIndex,
171
171
  noCardItemTip,
172
172
  rowCardType,
173
- columns,
174
173
  renderedColumns,
175
174
  unShowColumnKeyList,
176
175
  showScrollBtn,
@@ -216,20 +215,28 @@ class RowCard extends Component {
216
215
  }, displayRows.map((row, rowIdx) => {
217
216
  const formulaRow = formulaRows && formulaRows[row._id] || {};
218
217
  const displayRowName = getRowName(table.columns, row, formulaRows);
218
+ let renderedRow = {};
219
+ renderedColumns.forEach(column => {
220
+ renderedRow[column.key] = row[column.key];
221
+ });
222
+ const renderedTable = {
223
+ ...table,
224
+ columns: renderedColumns
225
+ };
219
226
  return /*#__PURE__*/React.createElement(RowCardItem, {
220
227
  key: "row-card-".concat(rowIdx),
221
228
  setItemScrollLeft: this.setItemScrollLeft,
222
229
  onRef: this.onRef,
223
230
  rowCardType: rowCardType,
224
- table: table,
225
- row: row,
231
+ table: renderedTable,
232
+ row: renderedRow,
226
233
  isAdditionEditorView: isAdditionEditorView,
227
234
  isHighlightRow: highlightRowIndex === rowIdx,
228
235
  formulaRow: formulaRow,
229
236
  formulaRows: formulaRows,
230
237
  displayRowName: displayRowName,
231
238
  rowIdx: rowIdx,
232
- columns: columns,
239
+ columns: renderedColumns,
233
240
  unShowColumnKeyList: unShowColumnKeyList,
234
241
  isShowRemoveCardItemBtn: isShowRemoveCardItemBtn,
235
242
  isExpandRowDetail: isExpandRowDetail,
@@ -92,8 +92,10 @@ class Records extends Component {
92
92
  className: "table-element-container",
93
93
  ref: ref => this.resultContainerRef = ref
94
94
  }, /*#__PURE__*/React.createElement("div", {
95
+ id: "sea-chart-table-element-result-container",
95
96
  className: "table-element-result-container"
96
97
  }, /*#__PURE__*/React.createElement("div", {
98
+ id: "sea-chart-table-element-result-content",
97
99
  className: "table-element-result-content",
98
100
  style: {
99
101
  width: totalWidth
@@ -1,5 +1,5 @@
1
1
  .vertical-scrollbar {
2
- width: 20px;
2
+ width: 15px;
3
3
  overflow: auto;
4
4
  position: absolute;
5
5
  top: 33px;
@@ -17,6 +17,14 @@ class VerticalScrollbar extends React.Component {
17
17
  this.isSelfScroll = true;
18
18
  };
19
19
  }
20
+ componentDidMount() {
21
+ const containerHeight = document.querySelector('#sea-chart-table-element-result-container').offsetHeight;
22
+ const contentHeight = document.querySelector('#sea-chart-table-element-result-content').clientHeight;
23
+ // isUsingTouchPad
24
+ if (containerHeight === contentHeight) {
25
+ this.container.style.height = this.container.clientHeight - 15 + 'px';
26
+ }
27
+ }
20
28
  render() {
21
29
  const {
22
30
  contentHeight
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "1.1.45",
3
+ "version": "1.1.47",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",