Skip to content

Commit

Permalink
Fixed displaying nested containers (#66)
Browse files Browse the repository at this point in the history
* Added nextTick to register dependencies after attribute deletion

* Parse attribute as int when possible

* recompile assets

* recompile assets

Co-authored-by: Rafael Milewski <rafael.milewski@gmail.com>
  • Loading branch information
Sjoertjuh and milewski committed Feb 6, 2022
1 parent 3d5876f commit 0b431cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion resources/js/components/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@
mounted() {
this.deepSearch(this.$root.$children)
/**
* nextTick will make sure any previous deletions have been done
* before trying to register them.
*/
this.$nextTick(() => this.deepSearch(this.$root.$children))
this.$root.$on('update-conditional-container', this.checkResolver)
this.$once('hook:beforeDestroy', () => {
Expand Down Expand Up @@ -233,6 +237,12 @@
}
if (!isNaN(attributeValue)) {
attributeValue = parseInt(attributeValue)
}
if (!isNaN(conditionValue)) {
conditionValue = parseInt(conditionValue)
Expand Down

0 comments on commit 0b431cc

Please sign in to comment.