Convenience function to update a form value with an Integer value. If the user input does not
return a number with parseInt, no state change occurs. Pass the Meiosis cell and the state
property (such as 'counter') or path (such as ['book', 'counter']) into which to update the
value. Returns a function that you can pass to a DOM handler, such as oninput (Mithril) or
onInput (Preact, React). For example:
// Using Mithil m('input[type=text]', { oninput:updateFormIntValue(cell, 'counter') })
// Using Preact/React <inputtype="text"onInput={updateFormIntValue(cell, ['book', 'counter'])}/>
Returns
a function that accepts a DOM event and updates the value on the Meiosis state.
Convenience function to update a form value with an Integer value. If the user input does not return a number with
parseInt
, no state change occurs. Pass the Meiosis cell and the state property (such as'counter'
) or path (such as['book', 'counter']
) into which to update the value. Returns a function that you can pass to a DOM handler, such asoninput
(Mithril) oronInput
(Preact, React). For example:Returns
a function that accepts a DOM event and updates the value on the Meiosis state.