Skip to content

Shortcut for common apply/commit patterns #8

Description

@dcore94

Very often for common input fields the apply/commit edi-functions are very boilerplate. Consider the following usual pattern:

target: "input[name=value]",
apply : (e,d,i)=>{ e.value = d.value },
commit: (e,d,i)=>{ d.value = e.value }

it could be useful to have a shortcut version which could even infer the assignments from the type of the DOM Element e and from the name of the input which needs to match the name of the key to access data object d..

As an example to be reasoned about:

target: "input[name=textinput]",
bind: auto /*auto for bidirectional, auto-apply or auto-commit for monodirectional binding*/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions