Skip to content

Instantly share code, notes, and snippets.

@keirbowden
Last active January 31, 2016 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keirbowden/49cd1aa31650ba2ea721 to your computer and use it in GitHub Desktop.
Save keirbowden/49cd1aa31650ba2ea721 to your computer and use it in GitHub Desktop.
Lightning Component for the User Freezer Blog Post
<aura:component controller="UserFreezer">
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="UserDetails" type="Object" />
<aura:attribute name="Message" type="String" />
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
<th>Frozen</th>
</tr>
<aura:iteration items="{!v.UserDetails}" var="ud">
<tr>
<td>{!ud.user.FirstName}</td>
<td>{!ud.user.LastName}</td>
<td>{!ud.user.Username}</td>
<td id="{!ud.user.Id}">
<ui:inputCheckbox change="{!c.frozenChanged}"
value="{!ud.userLogin.IsFrozen}" />
</td>
</tr>
</aura:iteration>
<tr>
<td colspan="5" class="apply">
<button onclick="{!c.applyChanges}">Apply</button>
</td>
</tr>
</table>
{!v.Message}
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment