Skip to content

Commit 86dca1b

Browse files
committed
Stability and UX for table checkbox actiosn
1 parent 3e0e1ad commit 86dca1b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/chart/table/TableChart.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ export const NeoTableChart = (props: ChartProps) => {
112112
return key != 'id' ? key : `${key} `;
113113
};
114114

115-
const actionableFields = actionsRules.map((r) => r.field);
116-
115+
const actionableFields = actionsRules.filter((r) => r.condition !== 'rowCheck').map((r) => r.field);
117116
const columns = transposed
118117
? [records[0].keys[0]].concat(records.map((record) => record._fields[0]?.toString() || '')).map((key, i) => {
119118
const uniqueKey = `${String(key)}_${i}`;
@@ -131,7 +130,9 @@ export const NeoTableChart = (props: ChartProps) => {
131130
actionableFields.includes(key)
132131
);
133132
})
134-
: records[0].keys.map((key, i) => {
133+
: records[0] &&
134+
records[0].keys &&
135+
records[0].keys.map((key, i) => {
135136
const value = records[0].get(key);
136137
if (columnWidthsType == 'Relative (%)') {
137138
return ApplyColumnType(

0 commit comments

Comments
 (0)