Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.editor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.editor
Commits
eae790f2
Commit
eae790f2
authored
6 years ago
by
Flavio TARSETTI
Browse files
Options
Downloads
Patches
Plain Diff
[js][plotter] fix issue to save boolean values and reload them
parent
fd1f1078
No related branches found
No related tags found
2 merge requests
!29
Fix issues for plotter editor and added unit tests
,
!23
Fix issues plotter editor
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
conda/js/src/components/ParameterCreate.jsx
+25
-0
25 additions, 0 deletions
conda/js/src/components/ParameterCreate.jsx
with
25 additions
and
0 deletions
conda/js/src/components/ParameterCreate.jsx
+
25
−
0
View file @
eae790f2
...
@@ -51,6 +51,19 @@ export default class ParameterCreate extends React.Component<Props, State> {
...
@@ -51,6 +51,19 @@ export default class ParameterCreate extends React.Component<Props, State> {
const
params
=
this
.
props
.
params
;
const
params
=
this
.
props
.
params
;
const
updateParameter
=
this
.
props
.
updateParameter
;
const
updateParameter
=
this
.
props
.
updateParameter
;
let
new_param
=
false
;
if
(
param
.
type
==
'
bool
'
)
{
if
(
typeof
(
param
.
default
)
==
'
string
'
)
{
new_param
=
true
;
}
else
{
new_param
=
false
;
}
}
return
(
return
(
<
React
.
Fragment
>
<
React
.
Fragment
>
<
TypedField
<
TypedField
...
@@ -332,6 +345,12 @@ export default class ParameterCreate extends React.Component<Props, State> {
...
@@ -332,6 +345,12 @@ export default class ParameterCreate extends React.Component<Props, State> {
<
Input
<
Input
name
=
{
`default
${
name
}
`
}
name
=
{
`default
${
name
}
`
}
type
=
'radio'
type
=
'radio'
checked
=
{
param
.
default
&&
!
new_param
}
value
=
{
true
}
onChange
=
{
(
e
)
=>
updateParameter
(
name
,
{
...
param
,
default
:
JSON
.
parse
(
e
.
target
.
value
)
})
}
/>
/>
True
True
</
Label
>
</
Label
>
...
@@ -341,6 +360,12 @@ export default class ParameterCreate extends React.Component<Props, State> {
...
@@ -341,6 +360,12 @@ export default class ParameterCreate extends React.Component<Props, State> {
<
Input
<
Input
name
=
{
`default
${
name
}
`
}
name
=
{
`default
${
name
}
`
}
type
=
'radio'
type
=
'radio'
checked
=
{
!
param
.
default
&&
!
new_param
}
value
=
{
false
}
onChange
=
{
(
e
)
=>
updateParameter
(
name
,
{
...
param
,
default
:
JSON
.
parse
(
e
.
target
.
value
)
})
}
/>
/>
False
False
</
Label
>
</
Label
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment