open-consul/ui-v2/app/components/radio-group/index.js

15 lines
289 B
JavaScript

import Component from '@ember/component';
const ENTER = 13;
export default Component.extend({
tagName: '',
keyboardAccess: false,
actions: {
keydown: function(e) {
if (e.keyCode === ENTER) {
e.target.dispatchEvent(new MouseEvent('click'));
}
},
},
});