File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
src/resources/views/crud/inc Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,7 @@ class CrudField {
7979
8080 if (this .isSubfield ) {
8181 window .crud .subfieldsCallbacks [this .parent .name ] ?? = [];
82- if (! window .crud .subfieldsCallbacks [this .parent .name ].some ( callbacks => callbacks[' fieldName' ] === this .name )) {
83- window .crud .subfieldsCallbacks [this .parent .name ].push ({closure, field: this });
84- }
82+ window .crud .subfieldsCallbacks [this .parent .name ].push ({ closure, field: this });
8583 return this ;
8684 }
8785
@@ -95,15 +93,12 @@ class CrudField {
9593
9694 change () {
9795 if (this .isSubfield ) {
98- if (typeof window .crud .subfieldsCallbacks [this .parent .name ].length !== ' undefined' ) {
99- window .crud .subfieldsCallbacks [this .parent .name ].forEach (item => {
100- item .triggerChange = true ;
101- });
102- }
103- return this ;
96+ window .crud .subfieldsCallbacks [this .parent .name ]? .forEach (callback => callback .triggerChange = true );
97+ } else {
98+ this .$input .trigger (` change` );
10499 }
105100
106- this . $input . trigger ( ` change ` ) ;
101+ return this ;
107102 }
108103
109104 show (value = true ) {
You can’t perform that action at this time.
0 commit comments