Guest User

Untitled

a guest
Nov 19th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <aura:attribute name="viewAllItemsSwitch" type="String" description="View all on/off" default="off"/>
  2. <div class="slds-form-element">
  3. <label class="slds-checkbox_toggle slds-grid">
  4. <span class="slds-form-element__label slds-m-bottom_none">View All Items</span>
  5. <input aura:id="swtichAllItems" type="checkbox" label="View All Items" value="{!v.viewAllItemsSwitch}" aria-describedby="toggle-desc" name="viewAllItems" onchange="{!c.switchSelectItemsView}" class="slds-p-around_large"/>
  6.  
  7. <span id="toggle-desc" class="slds-checkbox_faux_container" aria-live="assertive">
  8. <span class="slds-checkbox_faux"></span>
  9. <span class="slds-checkbox_on">All Items displayed</span>
  10. <span class="slds-checkbox_off">Some Items displayed</span>
  11. </span>
  12. </label>
  13. </div>
  14.  
  15. var toggleButton = component.find('swtichAllItems');
  16. if (toggleButton!=null)
  17. console.log(' value: '+toggleButton.get("v.value")+' checked: '+toggleButton.get("v.checked"));
Add Comment
Please, Sign In to add comment