Browse Source

Assessment: trigger mutation on select-all

Vijayakrishnan 4 năm trước cách đây
mục cha
commit
0737d9f45e

+ 4 - 1
resources/views/app/patient/canvas-sections/dx/form.blade.php

@@ -227,8 +227,11 @@ $formID = rand(0, 100000);
                 methods: {
                     includeAllChanged: function() {
                         for (let i = 0; i < this.items.length; i++) {
-                            this.inclusion[i] = this.includeAll;
+                            this.inclusion[i] = this.includeAll; // NOTE: this does not trigger a watch event
                         }
+                        $('#dxSection').find('[name="data"]').val(JSON.stringify({ // trigger mutation on select-all
+                            items: this.cleanArray(this.items)
+                        }));
                     },
                     includeChanged: function() {
                         let all = true;