Skip to content

Commit

Permalink
feat: allow v_model to be set after first render
Browse files Browse the repository at this point in the history
Previously v_model didn't respond to changes if it wasn't set
before first render.
  • Loading branch information
mariobuikhuizen committed Apr 17, 2024
1 parent de40fa4 commit 7421868
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/src/VueRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ function addListeners(model, vueModel) {
.forEach(key => model.on(`change:${key}`, listener));

model.on('change:v_model', () => {
if (vueModel.v_model === "!!disabled!!") {
vueModel.$forceUpdate();
}
if (model.get('v_model') !== vueModel.v_model) {
vueModel.v_model = model.get('v_model'); // eslint-disable-line no-param-reassign
}
Expand Down

0 comments on commit 7421868

Please sign in to comment.