fulcrumapp / fulcrum-expressions

Fulcrum expressions engine
http://developer.fulcrumapp.com/expressions/intro/
5 stars 0 forks source link

Add `blur` and `focus` listener events #26

Closed oeon closed 6 years ago

oeon commented 6 years ago

Use case: A user wants to build an app which includes a comparison between meter readings. The collector is to be ALERT-ed if the current meter reading entered happens to be less than the previous reading.

ON 'change' will fire for every change to the input and isn't ideal because we really only want to 'listen' to the last change to the current meter reading field. Various combinations of SETINTERVAL and SETTIMEOUT were tried (and were successful on the web) but didn't perform as expected when used within the 'change' listener functions on the mobile platforms.

ON 'validate-record' won't work here, because the user does not want to prevent the record from being saved...but rather simply to PROMPT the collector to double-check. The solution for now is to add a required field after the current meter reading field (e.g. 'Ready to submit?') and move the evaluation/alert into a change event on the added field.

blur seems to be the appropriate fit for this use case.

focus is similar/related and might be a natural addition if blur is added.

AHelms commented 6 years ago

RELEASED!! đŸ˜ƒ