Guest User

Untitled

a guest
Sep 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. import Bem from '../../../../util/Bem';
  2.  
  3. export default class Sort {
  4.  
  5. constructor() {
  6. this.bem = new Bem('cmp-search-sort');
  7.  
  8. this.component = $(this.bem.selector());
  9.  
  10. this.sortByElement = this.component.element(this.bem.scope('selection', 'sort-by').selector());
  11. this.sortDirectionElement = this.component.element(this.bem.scope('selection', 'sort-direction').selector());
  12. }
  13.  
  14. get sortByLabel() {
  15. return this.sortByElement.element(this.bem.element('selection-text'));
  16. }
  17.  
  18. get sortByOptions() {
  19. return this.sortByElement.elements(this.bem.element('selection-item'))
  20. }
  21.  
  22. get sortDirectionLabel() {
  23. return this.sortDirectionElement.element(this.bem.element('selection-text'));
  24. }
  25.  
  26. get sortDirectionOptions() {
  27. return this.sortDirectionElement.elements(this.bem.element('selection-item'));
  28. }
  29. }
Add Comment
Please, Sign In to add comment