Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

companion setting components inconsistent messages

 

<TextInput title="Alert Interval"

   label="Alert Interval (number of heart beats)"

   type="number"

   settingsKey="alertInterval"

 />

 

produces the message:

 

{“isTrusted":false,"key":"alertInterval","oldValue":"{\"name\":\"13\"}","newValue":"{\"name\":\"12\"}"}

 

and

 

<Toggle

   settingsKey="alertByCustomMaxHeartRate"

   label="Alert By Custom Max Heart Rate"

 />    

 

produces the message

 

{"isTrusted":false,"key":"alertByCustomMaxHeartRate","oldValue":"false","newValue":"true"}

 

and

 

<Slider

    settingsKey="anaerobicThresholdTolerance"

    min="0.5"

    max="0.6"

    step="0.1"

    onChange={value => props.settingsStorage.setItem('att', value)}

  />

 

produces the message

 

{"isTrusted":false,"key":"anaerobicThresholdTolerance","oldValue":"\"0.5\"","newValue":"\"0.6\""}

 

This makes it very hard to parse the values coming in. 

 

Is there any reason why the formats are different?

Best Answer
0 Votes
0 REPLIES 0