Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:attribute name="viewAllItemsSwitch" type="String" description="View all on/off" default="off"/>
- <div class="slds-form-element">
- <label class="slds-checkbox_toggle slds-grid">
- <span class="slds-form-element__label slds-m-bottom_none">View All Items</span>
- <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"/>
- <span id="toggle-desc" class="slds-checkbox_faux_container" aria-live="assertive">
- <span class="slds-checkbox_faux"></span>
- <span class="slds-checkbox_on">All Items displayed</span>
- <span class="slds-checkbox_off">Some Items displayed</span>
- </span>
- </label>
- </div>
- var toggleButton = component.find('swtichAllItems');
- if (toggleButton!=null)
- console.log(' value: '+toggleButton.get("v.value")+' checked: '+toggleButton.get("v.checked"));
Add Comment
Please, Sign In to add comment