Skip to content

Commit

Permalink
Warning on required prop sorting.sort.direction on Vis Editor Table
Browse files Browse the repository at this point in the history
Closes #69657
  • Loading branch information
DianaDerevyankina committed Oct 9, 2020
1 parent 5d71db0 commit aa350af
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { toMountPoint } from '../util';

interface Column {
name: string;
field: string;
width?: string;
actions?: object[];
}
Expand Down Expand Up @@ -440,12 +441,18 @@ class TableListView extends React.Component<TableListViewProps, TableListViewSta
},
};

const actionsColumnName = i18n.translate(
'kibana-react.tableListView.listing.table.actionTitle',
{
defaultMessage: 'Actions',
}
);

const columns = this.props.tableColumns.slice();
if (this.props.editItem) {
columns.push({
name: i18n.translate('kibana-react.tableListView.listing.table.actionTitle', {
defaultMessage: 'Actions',
}),
name: actionsColumnName,
field: actionsColumnName,
width: '100px',
actions,
});
Expand Down

0 comments on commit aa350af

Please sign in to comment.