2017-08-22 10:53:26 +03:00
|
|
|
import Component from '@ember/component';
|
|
|
|
import {schedule} from '@ember/runloop';
|
2015-10-28 14:36:45 +03:00
|
|
|
|
|
|
|
export default Component.extend({
|
2014-12-10 19:31:40 +03:00
|
|
|
active: false,
|
2018-01-11 20:43:23 +03:00
|
|
|
classNameBindings: ['active'],
|
2015-05-27 23:10:47 +03:00
|
|
|
linkClasses: null,
|
2018-01-11 20:43:23 +03:00
|
|
|
tagName: 'li',
|
2015-07-09 00:08:36 +03:00
|
|
|
|
|
|
|
actions: {
|
2015-10-28 14:36:45 +03:00
|
|
|
setActive(value) {
|
2016-06-30 21:14:25 +03:00
|
|
|
schedule('afterRender', this, function () {
|
2015-07-09 00:08:36 +03:00
|
|
|
this.set('active', value);
|
|
|
|
});
|
|
|
|
}
|
2018-01-11 20:43:23 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
click() {
|
2020-01-10 18:12:39 +03:00
|
|
|
this.element.querySelector('a').blur();
|
2015-07-09 00:08:36 +03:00
|
|
|
}
|
2014-04-02 06:09:28 +04:00
|
|
|
});
|