Ignore value feature by MichaelWest22 · Pull Request #95 · bigskysoftware/idiomorph · GitHub
Skip to content

Ignore value feature - #95

Open
MichaelWest22 wants to merge 3 commits into
bigskysoftware:mainfrom
MichaelWest22:ignoreValueFeature
Open

MichaelWest22 wants to merge 3 commits into
bigskysoftware:mainfrom
MichaelWest22:ignoreValueFeature

Conversation

@MichaelWest22

Copy link
Copy Markdown
Collaborator

Here is a possible new feature we can add. We already have support to ignore the value of the active element. This existing feature allow you to morph say a form with inputs to a new state but it will not update the contents of the item the user is currently focused on and entering input into. However for all other inputs in the same form their current values will need to passed back to the server and returned as they are in the response that gets morphed in so that the state of the other inputs can be preserved. This probably works well for most cases. But it would also be nice to support a more generic value preserving option like this IgnoreValue option where instead it can preserve ALL inputs, checkboxes and textarea's with the current DOM entry state. I found this feature mainly useful when testing form replacement and mutations on the client side as I didn't have a server interaction to submit and recreate the input values. I do not know if there is wider demand for this feature outside of this so feel free to ignore and close this PR

@MichaelWest22

Copy link
Copy Markdown
Collaborator Author

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant