Skip to content

FUTURE: ability to allow handler derived properties to be writeable. #41

@dchambers

Description

@dchambers

At present it's impossible to set() derived properties, and where this is needed an associated defined input property must be created. I've only encountered one example so far where this was needed, and it may turn out to be quite rare.

If it does become more commonplace though, we might consider allowing the model to indicate when it's acceptable for derived properties to be set via the model. For example, we could introduce a $ notation, like this:

model.addHandler(['list.$prop'], ['list.prop'], function(input, output, currentInput, currentOutput) {
    // ...
});

Here, I've used list.$prop to indicate that I want the handler to be given the values of the prop property provided using set(). Feel free to contribute if you can think of a better syntax for this.

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