File tree 1 file changed +8
-4
lines changed
admin-ui/app/routes/Apps/Gluu
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ function GluuInlineInput({
35
35
const [ show , setShow ] = useState ( false )
36
36
const [ correctValue , setCorrectValue ] = useState ( [ ] )
37
37
const [ data , setData ] = useState ( value )
38
- const onValueChanged = ( ) => {
38
+ const onValueChanged = ( e ) => {
39
+ if ( isBoolean ) {
40
+ setData ( e . target . checked )
41
+ } else {
42
+ setData ( e . target . value )
43
+ }
39
44
setShow ( true )
40
45
}
41
46
const handleTypeAheadChange = ( selectedOptions ) => {
@@ -54,12 +59,11 @@ function GluuInlineInput({
54
59
if ( isArray ) {
55
60
patch [ VALUE ] = correctValue
56
61
} else {
57
- patch [ VALUE ] = document . getElementById ( name ) . value
62
+ patch [ VALUE ] = data
58
63
}
59
64
patch [ 'op' ] = 'replace'
60
65
handler ( patch )
61
66
setShow ( ! show )
62
- setData ( document . getElementById ( name ) . value )
63
67
}
64
68
const onCancel = ( ) => {
65
69
setCorrectValue ( [ ] )
@@ -93,7 +97,7 @@ function GluuInlineInput({
93
97
id = { name }
94
98
data-testid = { name }
95
99
name = { name }
96
- onChange = { onValueChanged }
100
+ handler = { onValueChanged }
97
101
value = { value }
98
102
/>
99
103
) }
You can’t perform that action at this time.
0 commit comments