Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Conversation

@eyelidlessness
Copy link
Contributor

Current behavior:

  1. Actions defined in the model, or in the body adjacent its input, populate the model correctly.
  2. Actions nested within their input, with an explicit ref attribute, fail to update the view. This is because there is a hidden HTML input representing the action (distinct from the input representing the model value), which the current behavior selects.
  3. Actions nested within their input, without an explicit ref attribute, replace the entire descendant tree of the model with the geopoint value. The cause is identical to the explicit-ref case, but the erroneously selected input has no name attribute. This causes the model update, in Nodeset.setVal, to evaluate against a nodeset resolving to the root data node.

A couple open questions:

  1. Should the third case described above ever be allowed to happen? My instinct is that we should never allow calling setVal on a node with children.

  2. How does this affect performance? It's definitely doing more work. It seems fine on my obviously small test form, but I'm not sure how much it'll impact larger or more complex forms.

Current behavior:

1. Actions defined in the model, or in the body *adjacent* its input, populate the model correctly.
2. Actions nested within their input, with an explicit `ref` attribute, fail to update the view. This is because there is a hidden HTML input representing the action (distinct from the input representing the model value), which the current behavior selects.
3. Actions nested within their input, *without* an explicit `ref` attribute, replace the entire descendant tree of the model with the geopoint value. The cause is identical to the explicit-ref case, but the erroneously selected input has no `name` attribute. This causes the model update, in `Nodeset.setVal`, to evaluate against a nodeset resolving to the root `data` node.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant