Skip to content

Instantly share code, notes, and snippets.

@danic85
Created December 7, 2016 14:46
Show Gist options
  • Save danic85/4c48f7dd1d4532049b491c8cd1d47f31 to your computer and use it in GitHub Desktop.
Save danic85/4c48f7dd1d4532049b491c8cd1d47f31 to your computer and use it in GitHub Desktop.
Binding lightning:input checkbox value. Must bind to 'checked' not 'value'
<aura:attribute name="testBoolean" type="Boolean" default="false" />
<lightning:input name="testBoolean" label="Test Boolean" type="checkbox" checked="{!v.testBoolean}" />
@parthi22
Copy link

Hey, does this fire onChange event?

@rickschmidt
Copy link

Yes but the 'c' is lowercase. ie. onchange.

From the docs : "You can define a client-side controller action for input events like onblur, onfocus, and onchange." https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_input.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment