Unverified Commit b0d62be8 authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

[webui] fix some bugs on v2.1 bug bash (#3400)

parent a9b6fd42
......@@ -59,6 +59,7 @@ class ChangeColumnComponent extends React.Component<ChangeColumnProps, ChangeCol
const { currentSelected } = this.state;
const { allColumns, onSelectedChange } = this.props;
const selectedColumns = allColumns.map(column => column.key).filter(key => currentSelected.includes(key));
localStorage.setItem('columns', JSON.stringify(selectedColumns));
onSelectedChange(selectedColumns);
this.hideDialog();
};
......
......@@ -59,20 +59,23 @@ class DefaultPoint extends React.Component<DefaultPointProps, DefaultPointState>
};
pointClick = (params: any): void => {
if (window.location.pathname === '/oview') {
// [hasBestCurve: true]: is detail page, otherwise, is overview page
const { hasBestCurve } = this.props;
if (!hasBestCurve) {
this.props.changeExpandRowIDs(params.data[2], 'chart');
}
};
generateGraphConfig(_maxSequenceId: number): any {
const { startY, endY } = this.state;
const { hasBestCurve } = this.props;
return {
grid: {
left: '8%'
},
tooltip: {
trigger: 'item',
enterable: true,
enterable: hasBestCurve,
confine: true, // confirm always show tooltip box rather than hidden by background
formatter: (data: TooltipForAccuracy): React.ReactNode => {
return (
......
......@@ -101,7 +101,11 @@ class TableList extends React.Component<TableListProps, TableListState> {
this.state = {
displayedItems: [],
displayedColumns: defaultDisplayedColumns,
displayedColumns:
localStorage.getItem('columns') !== null
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
JSON.parse(localStorage.getItem('columns')!)
: defaultDisplayedColumns,
columns: [],
searchType: 'id',
searchText: '',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment