@vitessce/feature-list 3.6.12 → 3.6.14
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/dist/index.js +5880 -5856
- package/dist-tsc/FeatureList.d.ts.map +1 -1
- package/dist-tsc/FeatureList.js +5 -2
- package/dist-tsc/FeatureListSubscriber.d.ts.map +1 -1
- package/dist-tsc/FeatureListSubscriber.js +15 -6
- package/dist-tsc/selectable-table/SelectableTable.d.ts.map +1 -1
- package/dist-tsc/selectable-table/SelectableTable.js +5 -5
- package/dist-tsc/selectable-table/styles.d.ts.map +1 -1
- package/dist-tsc/selectable-table/styles.js +1 -0
- package/package.json +5 -5
- package/src/FeatureList.js +7 -0
- package/src/FeatureListSubscriber.js +37 -22
- package/src/selectable-table/SelectableTable.js +15 -17
- package/src/selectable-table/styles.js +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureList.d.ts","sourceRoot":"","sources":["../src/FeatureList.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FeatureList.d.ts","sourceRoot":"","sources":["../src/FeatureList.js"],"names":[],"mappings":"AAmBA,6DA0HC"}
|
package/dist-tsc/FeatureList.js
CHANGED
|
@@ -7,6 +7,9 @@ import { SelectableTable } from './selectable-table/index.js';
|
|
|
7
7
|
import { ALT_COLNAME } from './constants.js';
|
|
8
8
|
const useStyles = makeStyles()(() => ({
|
|
9
9
|
searchBar: {
|
|
10
|
+
marginTop: '10px',
|
|
11
|
+
marginLeft: '10px',
|
|
12
|
+
marginRight: '10px',
|
|
10
13
|
marginBottom: '4px',
|
|
11
14
|
border: '0',
|
|
12
15
|
padding: '2px',
|
|
@@ -14,7 +17,7 @@ const useStyles = makeStyles()(() => ({
|
|
|
14
17
|
},
|
|
15
18
|
}));
|
|
16
19
|
export default function FeatureList(props) {
|
|
17
|
-
const { hasColorEncoding, geneList = [], featureLabelsMap, geneSelection = [], geneFilter = null, setGeneSelection, enableMultiSelect, showFeatureTable, featureListSort, featureListSortKey, hasFeatureLabels, primaryColumnName, } = props;
|
|
20
|
+
const { width, height, hasColorEncoding, geneList = [], featureLabelsMap, geneSelection = [], geneFilter = null, setGeneSelection, enableMultiSelect, showFeatureTable, featureListSort, featureListSortKey, hasFeatureLabels, primaryColumnName, } = props;
|
|
18
21
|
const { classes } = useStyles();
|
|
19
22
|
const [searchTerm, setSearchTerm] = useState('');
|
|
20
23
|
const [searchResults, setSearchResults] = useState(geneList);
|
|
@@ -78,5 +81,5 @@ export default function FeatureList(props) {
|
|
|
78
81
|
[primaryColumnName],
|
|
79
82
|
];
|
|
80
83
|
}, [showFeatureTable, primaryColumnName, hasFeatureLabels]);
|
|
81
|
-
return (_jsxs(_Fragment, { children: [_jsx("input", { className: classes.searchBar, type: "text", placeholder: "Search", value: searchTerm, onChange: handleChange }), _jsx(SelectableTable, { columns: columns, columnLabels: columnLabels, data: data, hasColorEncoding: hasColorEncoding, idKey: "key", valueKey: "value", onChange: onChange, allowMultiple: enableMultiSelect, allowUncheck: enableMultiSelect, showTableHead: columnLabels.length > 1 })] }));
|
|
84
|
+
return (_jsxs(_Fragment, { children: [_jsx("input", { className: classes.searchBar, type: "text", placeholder: "Search", value: searchTerm, onChange: handleChange }), _jsx(SelectableTable, { columns: columns, columnLabels: columnLabels, data: data, hasColorEncoding: hasColorEncoding, idKey: "key", valueKey: "value", onChange: onChange, allowMultiple: enableMultiSelect, allowUncheck: enableMultiSelect, showTableHead: columnLabels.length > 1, width: width, height: height - 34 })] }));
|
|
82
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CAlBG;IAAsB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,sBAAsB,EAApC,MAAM;IAEQ,4BAA4B,EAA1C,MAAM;IAES,iBAAiB,EAAhC,OAAO;IAEQ,SAAS,EAAxB,OAAO;IAC0B,IAAI,EAArC,cAAc,GAAC,UAAU;IAGkB,OAAO,EAAlD,cAAc,GAAC,eAAe,GAAC,IAAI;CAC7C,eAwIA"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { pluralize as plur, capitalize, commaNumber } from '@vitessce/utils';
|
|
4
|
-
import { TitleInfo, useReady, useUrls, useFeatureLabelsData, useObsFeatureMatrixIndices, useCoordination, useLoaders, useExpandedFeatureLabelsMap, } from '@vitessce/vit-s';
|
|
4
|
+
import { TitleInfo, useReady, useUrls, useGridItemSize, useFeatureLabelsData, useObsFeatureMatrixIndices, useCoordination, useLoaders, useExpandedFeatureLabelsMap, } from '@vitessce/vit-s';
|
|
5
5
|
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
6
|
+
import { makeStyles } from '@vitessce/styles';
|
|
6
7
|
import FeatureList from './FeatureList.js';
|
|
7
8
|
import FeatureListOptions from './FeatureListOptions.js';
|
|
9
|
+
const useStyles = makeStyles()(theme => ({
|
|
10
|
+
featureListContainer: {
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: '100%',
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
backgroundColor: theme.palette.primaryBackground,
|
|
16
|
+
color: theme.palette.primaryForeground,
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
8
19
|
/**
|
|
9
20
|
* A subscriber component for a gene listing component.
|
|
10
21
|
* @param {object} props
|
|
@@ -29,6 +40,8 @@ import FeatureListOptions from './FeatureListOptions.js';
|
|
|
29
40
|
export function FeatureListSubscriber(props) {
|
|
30
41
|
const { coordinationScopes, removeGridComponent, variablesLabelOverride, theme, title: titleOverride, enableMultiSelect = false, showTable = false, sort = 'alphabetical', sortKey = null, closeButtonVisible, downloadButtonVisible, helpText = ViewHelpMapping.FEATURE_LIST, } = props;
|
|
31
42
|
const loaders = useLoaders();
|
|
43
|
+
const [width, height, containerRef] = useGridItemSize();
|
|
44
|
+
const { classes } = useStyles();
|
|
32
45
|
// Get "props" from the coordination space.
|
|
33
46
|
const [{ dataset, obsType, featureType, featureSelection: geneSelection, featureFilter: geneFilter, obsColorEncoding: cellColorEncoding, }, { setFeatureSelection: setGeneSelection, setFeatureFilter: setGeneFilter, setFeatureHighlight: setGeneHighlight, setObsColorEncoding: setCellColorEncoding, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_LIST], coordinationScopes);
|
|
34
47
|
const variablesLabel = variablesLabelOverride || featureType;
|
|
@@ -64,9 +77,5 @@ export function FeatureListSubscriber(props) {
|
|
|
64
77
|
const [featureListSortKey, setFeatureListSortKey] = useState(null);
|
|
65
78
|
const initialSortKey = sortKey || (hasFeatureLabels ? 'featureLabels' : 'featureIndex');
|
|
66
79
|
const primaryColumnName = `${capitalize(featureType)} ID`;
|
|
67
|
-
return (_jsx(TitleInfo, { title: title, info: `${commaNumber(numGenes)} ${plur(variablesLabel, numGenes)}`, theme: theme,
|
|
68
|
-
// Virtual scroll is used but this allows for the same styling as a scroll component
|
|
69
|
-
// even though this no longer uses the TitleInfo component's
|
|
70
|
-
// scroll css (SelectableTable is virtual scroll).
|
|
71
|
-
isScroll: true, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, helpText: helpText, errors: errors, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName })), children: _jsx(FeatureList, { hasColorEncoding: cellColorEncoding === 'geneSelection', showFeatureTable: showFeatureTable, geneList: geneList, featureListSort: featureListSort, featureListSortKey: featureListSortKey || initialSortKey, featureLabelsMap: expandedFeatureLabelsMap, featureType: featureType, geneSelection: geneSelection, geneFilter: geneFilter, setGeneSelection: setGeneSelectionAndColorEncoding, setGeneFilter: setGeneFilter, setGeneHighlight: setGeneHighlight, enableMultiSelect: enableMultiSelect, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName }) }));
|
|
80
|
+
return (_jsx(TitleInfo, { title: title, info: `${commaNumber(numGenes)} ${plur(variablesLabel, numGenes)}`, theme: theme, withPadding: false, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, helpText: helpText, errors: errors, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName })), children: _jsx("div", { ref: containerRef, className: classes.featureListContainer, children: _jsx(FeatureList, { width: width, height: height, hasColorEncoding: cellColorEncoding === 'geneSelection', showFeatureTable: showFeatureTable, geneList: geneList, featureListSort: featureListSort, featureListSortKey: featureListSortKey || initialSortKey, featureLabelsMap: expandedFeatureLabelsMap, featureType: featureType, geneSelection: geneSelection, geneFilter: geneFilter, setGeneSelection: setGeneSelectionAndColorEncoding, setGeneFilter: setGeneFilter, setGeneHighlight: setGeneHighlight, enableMultiSelect: enableMultiSelect, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName }) }) }));
|
|
72
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectableTable.d.ts","sourceRoot":"","sources":["../../src/selectable-table/SelectableTable.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;GAkBG;AACH,
|
|
1
|
+
{"version":3,"file":"SelectableTable.d.ts","sourceRoot":"","sources":["../../src/selectable-table/SelectableTable.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;GAkBG;AACH,iEAuLC"}
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
4
|
/* eslint-disable max-len */
|
|
5
5
|
import React, { useEffect, useCallback, useState } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { Table } from 'react-virtualized';
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
8
|
import { union, difference, isEqual } from 'lodash-es';
|
|
9
9
|
import clsx from 'clsx';
|
|
@@ -29,7 +29,7 @@ const SHIFT_KEYCODE = 16;
|
|
|
29
29
|
* By default, false.
|
|
30
30
|
*/
|
|
31
31
|
export default function SelectableTable(props) {
|
|
32
|
-
const { hasColorEncoding, columns, columnLabels, data, onChange, idKey = 'id', valueKey = 'value', allowMultiple = false, allowUncheck = false, showTableHead = true, showTableInputs = false, testHeight = undefined, testWidth = undefined, } = props;
|
|
32
|
+
const { hasColorEncoding, columns, columnLabels, data, onChange, idKey = 'id', valueKey = 'value', allowMultiple = false, allowUncheck = false, showTableHead = true, showTableInputs = false, testHeight = undefined, testWidth = undefined, width, height, } = props;
|
|
33
33
|
const [selectedRows, setSelectedRows] = useState(null);
|
|
34
34
|
const [isCheckingMultiple, setIsCheckingMultiple] = useState(false);
|
|
35
35
|
// Enable selecting multiple rows while the shift key is down.
|
|
@@ -127,7 +127,7 @@ export default function SelectableTable(props) {
|
|
|
127
127
|
// eslint-disable-next-line jsx-a11y/interactive-supports-focus
|
|
128
128
|
_jsxs("div", { className: clsx(classes.tableItem, classes.tableRow, { 'row-checked': isSelected(data[index][idKey]) }), style: style, role: "button", onClick: () => onSelectRow(data[index][idKey], !isSelected(data[index][idKey]) || !hasColorEncoding), children: [_jsx("div", { className: clsx(classes.inputContainer, classes.tableCell, { [classes.hiddenInputColumn]: !showTableInputs }), children: _jsx("label", { htmlFor: `${inputUuid}_${data[index][idKey]}`, children: _jsx("input", { id: `${inputUuid}_${data[index][idKey]}`, type: "checkbox", className: clsx(classes.radioOrCheckbox, isCheckingMultiple ? classes.tableCheckbox : classes.tableRadio), name: inputUuid, value: data[index][idKey], onChange: handleInputChange, checked: isSelected(data[index][idKey]) }) }) }), columns.map(column => (_jsx("div", { className: classes.tableCell, children: data[index][column] }, column)))] }, data[index][idKey]));
|
|
129
129
|
const headerRowRenderer = ({ style }) => (_jsx("div", { className: classes.tableRow, style: style, children: columnLabels.map(columnLabel => (_jsx("div", { className: classes.tableCell, style: { fontWeight: 'bold' }, children: columnLabel }, columnLabel))) }));
|
|
130
|
-
return (_jsx("div", { className: classes.selectableTable, children: _jsx(
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
return (_jsx("div", { className: classes.selectableTable, children: _jsx(Table, { height: testHeight || height, gridStyle: { outline: 'none' }, rowCount: data.length,
|
|
131
|
+
// 24 is 1 em + padding in either direction (see _selectable_table.scss).
|
|
132
|
+
rowHeight: 24, headerHeight: showTableHead ? 24 : undefined, rowRenderer: rowRenderer, width: testWidth || width, headerRowRenderer: showTableHead ? headerRowRenderer : undefined, rowGetter: ({ index }) => data[index] }) }));
|
|
133
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/selectable-table/styles.js"],"names":[],"mappings":"AAGA;;cAoB2D,CAAC;;;kBAEO,eAAsB;gBAGrF,WAEH;eACO,WAAU;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/selectable-table/styles.js"],"names":[],"mappings":"AAGA;;cAoB2D,CAAC;;;kBAEO,eAAsB;gBAGrF,WAEH;eACO,WAAU;EA4Cd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/feature-list",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.14",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"react-virtualized": "^9.22.6",
|
|
22
22
|
"uuid": "^9.0.0",
|
|
23
23
|
"react-aria": "^3.28.0",
|
|
24
|
-
"@vitessce/styles": "3.6.
|
|
25
|
-
"@vitessce/constants-internal": "3.6.
|
|
26
|
-
"@vitessce/utils": "3.6.
|
|
27
|
-
"@vitessce/vit-s": "3.6.
|
|
24
|
+
"@vitessce/styles": "3.6.14",
|
|
25
|
+
"@vitessce/constants-internal": "3.6.14",
|
|
26
|
+
"@vitessce/utils": "3.6.14",
|
|
27
|
+
"@vitessce/vit-s": "3.6.14"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@testing-library/jest-dom": "^6.6.3",
|
package/src/FeatureList.js
CHANGED
|
@@ -7,6 +7,9 @@ import { ALT_COLNAME } from './constants.js';
|
|
|
7
7
|
|
|
8
8
|
const useStyles = makeStyles()(() => ({
|
|
9
9
|
searchBar: {
|
|
10
|
+
marginTop: '10px',
|
|
11
|
+
marginLeft: '10px',
|
|
12
|
+
marginRight: '10px',
|
|
10
13
|
marginBottom: '4px',
|
|
11
14
|
border: '0',
|
|
12
15
|
padding: '2px',
|
|
@@ -16,6 +19,8 @@ const useStyles = makeStyles()(() => ({
|
|
|
16
19
|
|
|
17
20
|
export default function FeatureList(props) {
|
|
18
21
|
const {
|
|
22
|
+
width,
|
|
23
|
+
height,
|
|
19
24
|
hasColorEncoding,
|
|
20
25
|
geneList = [],
|
|
21
26
|
featureLabelsMap,
|
|
@@ -129,6 +134,8 @@ export default function FeatureList(props) {
|
|
|
129
134
|
allowMultiple={enableMultiSelect}
|
|
130
135
|
allowUncheck={enableMultiSelect}
|
|
131
136
|
showTableHead={columnLabels.length > 1}
|
|
137
|
+
width={width}
|
|
138
|
+
height={height - 34}
|
|
132
139
|
/>
|
|
133
140
|
</>
|
|
134
141
|
);
|
|
@@ -2,15 +2,27 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { pluralize as plur, capitalize, commaNumber } from '@vitessce/utils';
|
|
3
3
|
import {
|
|
4
4
|
TitleInfo,
|
|
5
|
-
useReady, useUrls,
|
|
5
|
+
useReady, useUrls, useGridItemSize,
|
|
6
6
|
useFeatureLabelsData, useObsFeatureMatrixIndices,
|
|
7
7
|
useCoordination, useLoaders,
|
|
8
8
|
useExpandedFeatureLabelsMap,
|
|
9
9
|
} from '@vitessce/vit-s';
|
|
10
10
|
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
11
|
+
import { makeStyles } from '@vitessce/styles';
|
|
11
12
|
import FeatureList from './FeatureList.js';
|
|
12
13
|
import FeatureListOptions from './FeatureListOptions.js';
|
|
13
14
|
|
|
15
|
+
const useStyles = makeStyles()(theme => ({
|
|
16
|
+
featureListContainer: {
|
|
17
|
+
width: '100%',
|
|
18
|
+
height: '100%',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
flexDirection: 'column',
|
|
21
|
+
backgroundColor: theme.palette.primaryBackground,
|
|
22
|
+
color: theme.palette.primaryForeground,
|
|
23
|
+
},
|
|
24
|
+
}));
|
|
25
|
+
|
|
14
26
|
|
|
15
27
|
/**
|
|
16
28
|
* A subscriber component for a gene listing component.
|
|
@@ -50,6 +62,8 @@ export function FeatureListSubscriber(props) {
|
|
|
50
62
|
} = props;
|
|
51
63
|
|
|
52
64
|
const loaders = useLoaders();
|
|
65
|
+
const [width, height, containerRef] = useGridItemSize();
|
|
66
|
+
const { classes } = useStyles();
|
|
53
67
|
|
|
54
68
|
// Get "props" from the coordination space.
|
|
55
69
|
const [{
|
|
@@ -122,10 +136,7 @@ export function FeatureListSubscriber(props) {
|
|
|
122
136
|
title={title}
|
|
123
137
|
info={`${commaNumber(numGenes)} ${plur(variablesLabel, numGenes)}`}
|
|
124
138
|
theme={theme}
|
|
125
|
-
|
|
126
|
-
// even though this no longer uses the TitleInfo component's
|
|
127
|
-
// scroll css (SelectableTable is virtual scroll).
|
|
128
|
-
isScroll
|
|
139
|
+
withPadding={false}
|
|
129
140
|
closeButtonVisible={closeButtonVisible}
|
|
130
141
|
downloadButtonVisible={downloadButtonVisible}
|
|
131
142
|
removeGridComponent={removeGridComponent}
|
|
@@ -146,23 +157,27 @@ export function FeatureListSubscriber(props) {
|
|
|
146
157
|
/>
|
|
147
158
|
)}
|
|
148
159
|
>
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
<div ref={containerRef} className={classes.featureListContainer}>
|
|
161
|
+
<FeatureList
|
|
162
|
+
width={width}
|
|
163
|
+
height={height}
|
|
164
|
+
hasColorEncoding={cellColorEncoding === 'geneSelection'}
|
|
165
|
+
showFeatureTable={showFeatureTable}
|
|
166
|
+
geneList={geneList}
|
|
167
|
+
featureListSort={featureListSort}
|
|
168
|
+
featureListSortKey={featureListSortKey || initialSortKey}
|
|
169
|
+
featureLabelsMap={expandedFeatureLabelsMap}
|
|
170
|
+
featureType={featureType}
|
|
171
|
+
geneSelection={geneSelection}
|
|
172
|
+
geneFilter={geneFilter}
|
|
173
|
+
setGeneSelection={setGeneSelectionAndColorEncoding}
|
|
174
|
+
setGeneFilter={setGeneFilter}
|
|
175
|
+
setGeneHighlight={setGeneHighlight}
|
|
176
|
+
enableMultiSelect={enableMultiSelect}
|
|
177
|
+
hasFeatureLabels={hasFeatureLabels}
|
|
178
|
+
primaryColumnName={primaryColumnName}
|
|
179
|
+
/>
|
|
180
|
+
</div>
|
|
166
181
|
</TitleInfo>
|
|
167
182
|
);
|
|
168
183
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
import React, { useEffect, useCallback, useState } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { Table } from 'react-virtualized';
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
7
|
import { union, difference, isEqual } from 'lodash-es';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -44,6 +44,8 @@ export default function SelectableTable(props) {
|
|
|
44
44
|
showTableInputs = false,
|
|
45
45
|
testHeight = undefined,
|
|
46
46
|
testWidth = undefined,
|
|
47
|
+
width,
|
|
48
|
+
height,
|
|
47
49
|
} = props;
|
|
48
50
|
|
|
49
51
|
const [selectedRows, setSelectedRows] = useState(null);
|
|
@@ -196,22 +198,18 @@ export default function SelectableTable(props) {
|
|
|
196
198
|
|
|
197
199
|
return (
|
|
198
200
|
<div className={classes.selectableTable}>
|
|
199
|
-
<
|
|
200
|
-
{
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
rowGetter={({ index }) => data[index]}
|
|
212
|
-
/>
|
|
213
|
-
)}
|
|
214
|
-
</AutoSizer>
|
|
201
|
+
<Table
|
|
202
|
+
height={testHeight || height}
|
|
203
|
+
gridStyle={{ outline: 'none' }}
|
|
204
|
+
rowCount={data.length}
|
|
205
|
+
// 24 is 1 em + padding in either direction (see _selectable_table.scss).
|
|
206
|
+
rowHeight={24}
|
|
207
|
+
headerHeight={showTableHead ? 24 : undefined}
|
|
208
|
+
rowRenderer={rowRenderer}
|
|
209
|
+
width={testWidth || width}
|
|
210
|
+
headerRowRenderer={showTableHead ? headerRowRenderer : undefined}
|
|
211
|
+
rowGetter={({ index }) => data[index]}
|
|
212
|
+
/>
|
|
215
213
|
</div>
|
|
216
214
|
);
|
|
217
215
|
}
|