diff --git a/src/components/Sword/Grid.js b/src/components/Sword/Grid.js
index 56bc9d5..aff6b9a 100644
--- a/src/components/Sword/Grid.js
+++ b/src/components/Sword/Grid.js
@@ -100,9 +100,8 @@ export default class Grid extends PureComponent {
const selectKey = row[pkField] || row[childPkField];
if (`${selectKey}`.indexOf(',') > 0) {
return `${selectKey}`.split(',');
- } else {
- return selectKey;
}
+ return selectKey;
});
};
@@ -199,9 +198,7 @@ export default class Grid extends PureComponent {
} = this.props;
let { columns } = this.props;
- const actionButtons = buttons.filter(button => {
- return button.action === 2 || button.action === 3;
- });
+ const actionButtons = buttons.filter(button => button.action === 2 || button.action === 3);
if (columns && Array.isArray(columns) && actionButtons.length > 0) {
const key = pkField || rowKey || 'id';
@@ -210,23 +207,21 @@ export default class Grid extends PureComponent {
{
title: formatMessage({ id: 'table.columns.action' }),
width: actionColumnWidth || 200,
- render: (text, record) => {
- return (
-
- {actionButtons.map((button, index) => (
-
- {index > 0 ? : null}
- this.handelClick(button, [record[childPkField || key]])}
- >
-
-
-
- ))}
-
- );
- },
+ render: (text, record) => (
+
+ {actionButtons.map((button, index) => (
+
+ {index > 0 ? : null}
+ this.handelClick(button, [record[childPkField || key]])}
+ >
+
+
+
+ ))}
+
+ ),
},
];
}