Created
August 22, 2016 14:18
-
-
Save anvyst/710b9ef8752941a711e35cc345c28b57 to your computer and use it in GitHub Desktop.
Using JCF options in multiple Select elements with Ember
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
classNames: ['input2','country-list'], | |
didRender() { | |
Ember.run.later(function(){ | |
jcf.replace('#input2-select','Select'); | |
}) | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
/* it re-initiates the custom element after render */ | |
didRender() { | |
jcf.replace('#currency-options','Select', { | |
"wrapNative": false, | |
"wrapNativeOnMobile": true | |
}); | |
}, | |
actions: { | |
update(value) { | |
Ember.Logger.info("currency changed to " + value); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment