Merge pull request #12913 from ArtemDzhereleiko/AD/imp/get-dashboard-state-id-help
Help for get dashboard state id aciton
This commit is contained in:
		
						commit
						f52c361b83
					
				@ -171,6 +171,8 @@ export class GetValueActionSettingsPanelComponent extends PageComponent implemen
 | 
				
			|||||||
    const action: GetValueAction = this.getValueSettingsFormGroup.get('action').value;
 | 
					    const action: GetValueAction = this.getValueSettingsFormGroup.get('action').value;
 | 
				
			||||||
    if (action === GetValueAction.GET_DASHBOARD_STATE_OBJECT) {
 | 
					    if (action === GetValueAction.GET_DASHBOARD_STATE_OBJECT) {
 | 
				
			||||||
      return 'widget/config/parse_value_get_dashboard_state_object_fn';
 | 
					      return 'widget/config/parse_value_get_dashboard_state_object_fn';
 | 
				
			||||||
 | 
					    } else if (action === GetValueAction.GET_DASHBOARD_STATE) {
 | 
				
			||||||
 | 
					      return 'widget/config/parse_value_get_dashboard_state_id_fn';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return 'widget/lib/rpc/parse_value_fn';
 | 
					    return 'widget/lib/rpc/parse_value_fn';
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,33 @@
 | 
				
			|||||||
 | 
					#### Parse value function
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="divider"></div>
 | 
				
			||||||
 | 
					<br/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*function (data): boolean*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					A JavaScript function that converts the current dashboard state id into a boolean value.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Parameters:**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<ul>
 | 
				
			||||||
 | 
					  <li><b>data:</b> <code> string </code> - the current dashboard state id.
 | 
				
			||||||
 | 
					   </li>
 | 
				
			||||||
 | 
					</ul>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Returns:**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`true` if the widget should be in an activated state, `false` otherwise.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<div class="divider"></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##### Examples
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Check if the current dashboard state id is "default":
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```javascript
 | 
				
			||||||
 | 
					return data === 'default' ? true : false;
 | 
				
			||||||
 | 
					{:copy-code}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<br>
 | 
				
			||||||
 | 
					<br>
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user