Skip to content

Instantly share code, notes, and snippets.

@mydea
Last active April 18, 2017 09:51
Show Gist options
  • Save mydea/1be78119b5c74c01f41231cc24a68e2e to your computer and use it in GitHub Desktop.
Save mydea/1be78119b5c74c01f41231cc24a68e2e to your computer and use it in GitHub Desktop.
power-select-initially-open
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
options: [],
showSelect: false,
actions: {
onchange() {},
showSelect() {
this.set('showSelect', true);
}
}
});
<h1>Test power select with initiallyOpened=true</h1>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
<p>---</p>
{{#if showSelect}}
{{#power-select
options=options
onchange=(action 'onchange')
initiallyOpened=true
}}
{{/power-select}}
{{else}}
<button {{action 'showSelect'}}>Show select</button>
{{/if}}
{
"version": "0.12.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1",
"ember-power-select": "1.6.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment