Basically an extension of Ember's native Input
component,
but applies some Bootstrap styling. See Ember Input
documentation
for more information.
If you want input-group-addons, you will need to pass them into the component like so. This is to ensure that the character count doesn't mess with the addon. Note that you should not wrap it in the 'input-group' class, as that is done within the component:
<FwInput @value={{myVariable}} @update={{action (mut myvariable)}} as |section|>
{{#if section.prepend}}
{{!-- insert prepend addon here --}}
{{else if section.append}}
{{!-- inset append addon here --}}
{{/if}}
</FwInput>
Methods
focus
BooleanThis is the only added attribute to the Ember input. If true, it will focus on the input when the page loads.
Default: false
maxCount
BooleanSets the limit of how many characters are allowed to be typed. Whichever of maxlength or maxCount is greater will determine the actual limit, but the count will display as negative and red if maxlength is surpassed.
Default: 200
placeholder
StringThis is an optional attribute that changes the placeholder of the input (the grey text which appears if the textarea is empty).
Default: null
showCount
BooleanIf true, number of characters remaining will appear below the input, on the right.
Default: true
update
ActionThis attribute takes the action which is called whenever the value is changed. It is always used with the native handlebars action helper, and is often used with the native handlebars mut helper (as seen in the example above).
value
StringThe variable that is the value of the input (the information displayed in it).
Default: null