fix issue with number inputs not serializing correctly due to setting values as strings instead of numbers (#94)
consolidate number, string and checkbox value change functions (cherry picked from commit 22c1590885db0534afabff74be7504ca9a0998b5)
This commit is contained in:
		@@ -18,14 +18,14 @@ class OTASettingsForm extends React.Component<OTASettingsFormProps> {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  render() {
 | 
			
		||||
    const { data, handleValueChange, handleCheckboxChange, saveData, loadData } = this.props;
 | 
			
		||||
    const { data, handleValueChange, saveData, loadData } = this.props;
 | 
			
		||||
    return (
 | 
			
		||||
      <ValidatorForm onSubmit={saveData}>
 | 
			
		||||
        <BlockFormControlLabel
 | 
			
		||||
          control={
 | 
			
		||||
            <Checkbox
 | 
			
		||||
              checked={data.enabled}
 | 
			
		||||
              onChange={handleCheckboxChange("enabled")}
 | 
			
		||||
              onChange={handleValueChange("enabled")}
 | 
			
		||||
            />
 | 
			
		||||
          }
 | 
			
		||||
          label="Enable OTA Updates?"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user