@@ -83,9 +83,10 @@ const Options = ({dispatch, options}) =>
8383
8484 < Form . Input
8585 label = 'Identifiers Prefix'
86- onBlur = { ( event ) => dispatch ( actions . setIdentifiersPrefix ( event . target . value ) ) }
87- defaultValue = { options . identifiersPrefix }
88- placeholder = '' />
86+ value = { options . identifiersPrefix }
87+ placeholder = ''
88+ onChange = { ( event , { value} ) => dispatch ( actions . setIdentifiersPrefix ( value ) ) }
89+ />
8990
9091 < Form . Checkbox
9192 label = 'Rename Globals'
@@ -109,11 +110,11 @@ const Options = ({dispatch, options}) =>
109110 < Form . Input
110111 type = 'number'
111112 label = 'Control Flow Flattening Threshold'
112- defaultValue = { options . controlFlowFlatteningThreshold }
113+ value = { options . controlFlowFlatteningThreshold }
113114 min = "0"
114115 max = "1"
115116 step = "0.1"
116- onChange = { ( event ) => dispatch ( actions . setControlFlowFlatteningThreshold ( parseFloat ( event . target . value ) ) ) }
117+ onChange = { ( event , { value } ) => dispatch ( actions . setControlFlowFlatteningThreshold ( parseFloat ( value ) ) ) }
117118 disabled = { ! options . controlFlowFlattening } />
118119
119120 < Divider />
@@ -126,11 +127,11 @@ const Options = ({dispatch, options}) =>
126127 < Form . Input
127128 type = 'number'
128129 label = 'Dead Code Injection Threshold'
129- defaultValue = { options . deadCodeInjectionThreshold }
130+ value = { options . deadCodeInjectionThreshold }
130131 min = "0"
131132 max = "1"
132133 step = "0.1"
133- onChange = { ( event ) => dispatch ( actions . setDeadCodeInjectionThreshold ( parseFloat ( event . target . value ) ) ) }
134+ onChange = { ( event , { value } ) => dispatch ( actions . setDeadCodeInjectionThreshold ( parseFloat ( value ) ) ) }
134135 disabled = { ! options . deadCodeInjection } />
135136
136137
@@ -168,11 +169,11 @@ const Options = ({dispatch, options}) =>
168169 < Form . Input
169170 type = 'number'
170171 label = 'String Array Threshold'
171- defaultValue = { options . stringArrayThreshold }
172+ value = { options . stringArrayThreshold }
172173 min = "0"
173174 max = "1"
174175 step = "0.1"
175- onChange = { ( event ) => dispatch ( actions . setStringArrayThreshold ( parseFloat ( event . target . value ) ) ) }
176+ onChange = { ( event , { value } ) => dispatch ( actions . setStringArrayThreshold ( parseFloat ( value ) ) ) }
176177 disabled = { ! options . stringArrayThresholdEnabled } />
177178
178179 < Divider />
@@ -185,10 +186,10 @@ const Options = ({dispatch, options}) =>
185186 < Form . Input
186187 type = 'number'
187188 label = 'Split Strings Chunk Length'
188- defaultValue = { options . splitStringsChunkLength }
189+ value = { options . splitStringsChunkLength }
189190 min = "1"
190191 step = "1"
191- onChange = { ( event ) => dispatch ( actions . setSplitStringsChunkLength ( parseInt ( event . target . value ) ) ) }
192+ onChange = { ( event , { value } ) => dispatch ( actions . setSplitStringsChunkLength ( parseInt ( value ) ) ) }
192193 disabled = { ! options . splitStringsChunkLengthEnabled } />
193194
194195 < Divider />
@@ -272,27 +273,27 @@ const Options = ({dispatch, options}) =>
272273 < Form . Input
273274 label = 'Source Map Base URL'
274275 disabled = { ! options . sourceMapSeparate }
275- onBlur = { ( event ) => dispatch ( actions . setSourceMapBaseUrl ( event . target . value ) ) }
276- defaultValue = { options . sourceMapBaseUrl }
276+ onChange = { ( event , { value } ) => dispatch ( actions . setSourceMapBaseUrl ( value ) ) }
277+ value = { options . sourceMapBaseUrl }
277278 placeholder = 'http://localhost:3000' />
278279
279280 < Form . Input
280281 label = 'Source Map File Name'
281282 disabled = { ! options . sourceMapSeparate }
282- onBlur = { ( event ) => dispatch ( actions . setSourceMapFileName ( event . target . value ) ) }
283- defaultValue = { options . sourceMapFileName }
283+ onChange = { ( event , { value } ) => dispatch ( actions . setSourceMapFileName ( value ) ) }
284+ value = { options . sourceMapFileName }
284285 placeholder = 'example' />
285286
286287 < Divider />
287288
288289 < Form . Input
289290 type = 'number'
290291 label = 'Seed'
291- defaultValue = { options . seed }
292+ value = { options . seed }
292293 min = "0"
293294 max = "99999999"
294295 step = "1"
295- onChange = { ( event ) => dispatch ( actions . setSeed ( parseInt ( event . target . value ) ) ) } />
296+ onChange = { ( event , { value } ) => dispatch ( actions . setSeed ( parseInt ( value ) ) ) } />
296297
297298 < Divider />
298299
0 commit comments