Skip to content

Commit 0b431cc

Browse files
Sjoertjuhmilewski
andauthored
Fixed displaying nested containers (#66)
* 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>
1 parent 3d5876f commit 0b431cc

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/components/FormField.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@
7777
7878
mounted() {
7979
80-
this.deepSearch(this.$root.$children)
80+
/**
81+
* nextTick will make sure any previous deletions have been done
82+
* before trying to register them.
83+
*/
84+
this.$nextTick(() => this.deepSearch(this.$root.$children))
8185
8286
this.$root.$on('update-conditional-container', this.checkResolver)
8387
this.$once('hook:beforeDestroy', () => {
@@ -233,6 +237,12 @@
233237
234238
}
235239
240+
if (!isNaN(attributeValue)) {
241+
242+
attributeValue = parseInt(attributeValue)
243+
244+
}
245+
236246
if (!isNaN(conditionValue)) {
237247
238248
conditionValue = parseInt(conditionValue)

0 commit comments

Comments
 (0)