Skip to content

Commit

Permalink
Fixed hidden input value refresh and updated todos
Browse files Browse the repository at this point in the history
  • Loading branch information
gbisurgi committed May 12, 2024
1 parent 220a2ff commit d401686
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions dist/jedi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2659,7 +2659,7 @@ class _e extends D {
const t = {};
this.children.forEach((e) => {
e.isActive && (t[e.getKey()] = e.getValue());
}), this.setValue(t);
}), this.value = t, this.emit("change");
}
refreshInstances() {
const t = this.getValue();
Expand Down Expand Up @@ -3027,9 +3027,9 @@ class as extends Xt {
jedi: this,
schema: this.options.schema,
path: this.rootName
}), l(this.options.data) && this.root.setValue(this.options.data, !1), this.bindEventListeners(), this.options.container && (this.container = this.options.container, this.appendHiddenInput(), this.container.appendChild(this.root.ui.control.container), this.container.classList.add("jedi-ready"), setTimeout(() => {
}), l(this.options.data) && this.root.setValue(this.options.data, !1), this.options.container && (this.container = this.options.container, this.appendHiddenInput(), this.container.appendChild(this.root.ui.control.container), this.container.classList.add("jedi-ready"), setTimeout(() => {
this.emit("ready");
}));
})), this.bindEventListeners();
}
bindEventListeners() {
this.root && this.root.on("change", () => {
Expand Down
2 changes: 1 addition & 1 deletion dist/jedi.umd.cjs

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions docs/js/jedi.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/instances/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ class InstanceObject extends Instance {
}
})

this.setValue(value)
this.value = value
this.emit('change')
}

refreshInstances () {
Expand Down
4 changes: 2 additions & 2 deletions src/jedi.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ class Jedi extends EventEmitter {
this.root.setValue(this.options.data, false)
}

this.bindEventListeners()

if (this.options.container) {
this.container = this.options.container
this.appendHiddenInput()
Expand All @@ -135,6 +133,8 @@ class Jedi extends EventEmitter {
this.emit('ready')
})
}

this.bindEventListeners()
}

bindEventListeners () {
Expand Down
1 change: 0 additions & 1 deletion todo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Todo

- object onChildChange like multiple and array
- hide if-then-else headers
- better elements class names
- move actions on top of cards
Expand Down

0 comments on commit d401686

Please sign in to comment.