Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ember-bootstrap-power-select
Advanced tools
Changelog
v5.0.0 (2023-02-24)
Releasing latest RC (v5.0.0-0) as stable version. Please find details in release notes for that release.
Readme
Integrate Ember Power Select into your Ember Bootstrap forms.
ember install ember-bootstrap-power-select
This will additionally install ember-power-select
into your app, and setup its
Bootstrap theme, either by importing the appropriate Less or Sass file (if you use one of these preprocessors), or by
editing your ember-cli-build.js
to include the static theme CSS (if you use plain CSS).
With this addon installed, you have a new controlType
of power-select
available. Use the options
property to
set the array of selectable options:
<BsForm @model={{yourModel}} as |form|>
<form.element @controlType="power-select" @property="foo" @label="Choose" @options={{options}} />
</BsForm>
If your options array consists of objects, use the optionLabelPath
to specify the property that should be used as the
options label:
<BsForm @model={{yourModel}} as |form|>
<form.element @controlType="power-select" @property="foo" @label="Choose" @options={{options}} @optionLabelPath="title" />
</BsForm>
If you need more control over how the options label are rendered (e.g. for formatting or internalization) you should use the yielded <control>
component in block mode:
<BsForm @model={{yourModel}} as |form|>
<form.element @controlType="power-select" @property="author" @label="Author" @options={{options}} as |el|>
<el.control as |option|>
{{option.name}} (b. {{format-date option.dayOfBirth}})
</el.control>
</form.element>
</BsForm>
The power-select-multiple
is also supported and works similarly to the power-select
implementation.
<BsForm @model={{yourModel}} as |form|>
<form.element @controlType="power-select-multiple" @property="foo" @label="Choose" @options={{options}} />
</BsForm>
If you need more control of the power-select configuration, use the yielded control
component to get direct access
to the power-select component. The power-select's selected
, disabled
properties and the onChange
action are already wired up to the controlling form.element
for you. Set any other options as you need:
<BsForm @model={{yourModel}} as |form|>
<form.element @controlType="power-select" @property="foo" @label="Choose" @options={{options}} as |el|>
<el.control @searchPlaceholder="Type your name" />
</form.element>
</BsForm>
Please consult the Ember Power Select documentation for all available options.
See the Contributing guide for details.
This project is licensed under the MIT License.
FAQs
Integrate ember-power-select into your ember-bootstrap forms
The npm package ember-bootstrap-power-select receives a total of 1,879 weekly downloads. As such, ember-bootstrap-power-select popularity was classified as popular.
We found that ember-bootstrap-power-select demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.