Warning: The magic method SFML_Singleton::__wakeup() must have public visibility in /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/feed-rss2.php on line 8
ember-paper – Thoughts, etc. https://www.munderwood.ca Tracking the occasional random walk Fri, 01 Sep 2017 18:21:52 +0000 en-CA hourly 1 https://wordpress.org/?v=5.7.2 https://www.munderwood.ca/wp-content/uploads/2016/03/photo-150x150.jpg ember-paper – Thoughts, etc. https://www.munderwood.ca 32 32 Clearing an Ember Paper select component https://www.munderwood.ca/index.php/2017/09/01/clearing-an-ember-paper-select-component/ https://www.munderwood.ca/index.php/2017/09/01/clearing-an-ember-paper-select-component/#respond Fri, 01 Sep 2017 18:21:52 +0000 http://www.munderwood.ca/?p=215 To allow users to clear the selection of an Ember Paper {{paper-select}} component, simply pass it the  allowClear=true option:

{{#paper-select
    placeholder="Select a thing..."
    required=false
    allowClear=true
    ...
}}

This option is passed along to the ember-power-select component that ember-paper uses under the hood, so the resulting clear button can be styled accordingly. For example,

.ember-power-select-clear-btn {
  position: absolute;
  right: 25px;
}

Thanks to @miguelcobain for this tip on the community Slack channel.

]]>
https://www.munderwood.ca/index.php/2017/09/01/clearing-an-ember-paper-select-component/feed/ 0