Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
4338bcb7
Unverified
Commit
4338bcb7
authored
Apr 02, 2021
by
Lijiaoa
Committed by
GitHub
Apr 02, 2021
Browse files
fix bug of `Add/Remove` modal (#3491)
parent
45236e18
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
ts/webui/src/components/modals/ChangeColumnComponent.tsx
ts/webui/src/components/modals/ChangeColumnComponent.tsx
+7
-2
ts/webui/src/components/trial-detail/Para.tsx
ts/webui/src/components/trial-detail/Para.tsx
+6
-1
ts/webui/src/components/trial-detail/TableList.tsx
ts/webui/src/components/trial-detail/TableList.tsx
+1
-0
No files found.
ts/webui/src/components/modals/ChangeColumnComponent.tsx
View file @
4338bcb7
...
...
@@ -12,6 +12,7 @@ interface ChangeColumnProps {
onSelectedChange
:
(
val
:
string
[])
=>
void
;
onHideDialog
:
()
=>
void
;
minSelected
?:
number
;
whichComponent
:
string
;
// which component use this component
}
interface
SimpleColumn
{
...
...
@@ -57,10 +58,14 @@ class ChangeColumnComponent extends React.Component<ChangeColumnProps, ChangeCol
saveUserSelectColumn
=
():
void
=>
{
const
{
currentSelected
}
=
this
.
state
;
const
{
allColumns
,
onSelectedChange
}
=
this
.
props
;
const
{
allColumns
,
onSelectedChange
,
whichComponent
}
=
this
.
props
;
const
selectedColumns
=
allColumns
.
map
(
column
=>
column
.
key
).
filter
(
key
=>
currentSelected
.
includes
(
key
));
localStorage
.
setItem
(
'
columns
'
,
JSON
.
stringify
(
selectedColumns
));
onSelectedChange
(
selectedColumns
);
if
(
whichComponent
===
'
table
'
)
{
localStorage
.
setItem
(
'
columns
'
,
JSON
.
stringify
(
selectedColumns
));
}
else
{
localStorage
.
setItem
(
'
paraColumns
'
,
JSON
.
stringify
(
selectedColumns
));
}
this
.
hideDialog
();
};
...
...
ts/webui/src/components/trial-detail/Para.tsx
View file @
4338bcb7
...
...
@@ -51,7 +51,11 @@ class Para extends React.Component<ParaProps, ParaState> {
noChart
:
true
,
customizeColumnsDialogVisible
:
false
,
availableDimensions
:
[],
chosenDimensions
:
[]
chosenDimensions
:
localStorage
.
getItem
(
'
paraColumns
'
)
!==
null
?
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
JSON
.
parse
(
localStorage
.
getItem
(
'
paraColumns
'
)
!
)
:
[]
};
}
...
...
@@ -130,6 +134,7 @@ class Para extends React.Component<ParaProps, ParaState> {
this
.
setState
({
customizeColumnsDialogVisible
:
false
});
}
}
minSelected
=
{
2
}
whichComponent
=
'para'
/>
)
}
<
div
className
=
'parcoords'
style
=
{
this
.
chartMulineStyle
}
ref
=
{
this
.
paraRef
}
/>
...
...
ts/webui/src/components/trial-detail/TableList.tsx
View file @
4338bcb7
...
...
@@ -571,6 +571,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
onHideDialog
=
{
():
void
=>
{
this
.
setState
({
customizeColumnsDialogVisible
:
false
});
}
}
whichComponent
=
'table'
/>
)
}
{
/* Clone a trial and customize a set of new parameters */
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment