File tree Expand file tree Collapse file tree 3 files changed +12
-24
lines changed
docs/content/dev-tools/depends-on
ui.apps/src/main/content/jcr_root/apps/etoolbox-authoring-kit/depends-on Expand file tree Collapse file tree 3 files changed +12
-24
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,21 @@ order: 3
1010
1111Built-in plug-in actions are:
1212* ` visibility ` - hide the element if the Query result is 'falsy'. <u >This is the default action that is applied when no action is specified.</u >
13+
1314* ` tab-visibility ` - hide the tab or the element's parent tab if the Query result is 'falsy'
14- * ` set ` - set the Query result as the field's value (undefined Query result skipped)
15- * ` set-if-blank ` - set the Query result as the field's value only if the current value is blank (undefined Query result skipped)
15+
16+ * ` set ` - set the Query result as the field's value (` undefined ` Query result skipped).
17+ Supports optional ` path ` parameter to set the value to the nested property of the field.
18+
19+ * ` set-if-blank ` - set the Query result as the field's value only if the current value is blank (` undefined ` Query result skipped).
20+ Supports optional ` path ` parameter to set the value to the nested property of the field.
21+
1622* ` readonly ` - set the readonly marker of the field from the Query result.
23+
1724* ` required ` - set the required marker of the field from the Query result.
25+
1826* ` validate ` - set the validation state of the field from the Query result.
27+
1928* ` disabled ` - set the field's disabled state from the Query result. Supports multiple actions effect for the same field.
2029
2130### Async actions
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ js/accessors/dependsOnCoralFieldsetAccessor.js
3030
3131# Actions
3232js/actions/dependsOnCoralBasicActions.js
33+ js/actions/dependsOnCoralSetActions.js
3334js/actions/dependsOnCoralValidateAction.js
3435js/actions/dependsOnFetchAction.js
3536js/actions/dependsOnCoralTabAction.js
Original file line number Diff line number Diff line change 6161 ns . ActionRegistry . register ( 'disabled' , function setDisabled ( state ) {
6262 ns . ElementAccessors . requestDisable ( this . $el , state , this ) ;
6363 } ) ;
64-
65- /**
66- * Set the field value from the query result, skip undefined query results
67- * query type: string
68- * */
69- ns . ActionRegistry . register ( 'set' , function setValue ( value ) {
70- if ( value !== undefined ) {
71- ns . ElementAccessors . setValue ( this . $el , value ) ;
72- }
73- } ) ;
74-
75- /**
76- * Set the field value from the query result only if the field value is blank,
77- * skip undefined query results
78- * query type: string
79- * */
80- ns . ActionRegistry . register ( 'set-if-blank' , function setValueIfBlank ( value ) {
81- const current = ns . ElementAccessors . getValue ( this . $el ) ;
82- if ( ( current === '' || current === null || current === undefined ) && value !== undefined ) {
83- ns . ElementAccessors . setValue ( this . $el , value ) ;
84- }
85- } ) ;
8664} ) ( Granite . $ , Granite . DependsOnPlugin = ( Granite . DependsOnPlugin || { } ) ) ;
You can’t perform that action at this time.
0 commit comments