Handle sorting the Greek and Ulb texts

This commit is contained in:
Leonard Smith 2021-05-21 06:16:39 -05:00
parent d861a6a470
commit cecfce8597
3 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<div class="verse-greek-text">
{{#each @model as |word|}}
{{#each this.sortedWords as |word|}}
<Words::GreekWord @model={{word}} />
{{/each}}
</div>

View File

@ -0,0 +1,7 @@
import Component from '@glimmer/component';
import { sort } from '@ember/object/computed';
export default class WordsGreekTextComponent extends Component {
sortDefinition = ['ogntSort'];
@sort('args.model', 'sortDefinition') sortedWords;
}

View File

@ -0,0 +1,7 @@
import Component from '@glimmer/component';
import { sort } from '@ember/object/computed';
export default class WordsUlbTextComponent extends Component {
sortDefinition = ['ulbSort'];
@sort('args.model', 'sortDefinition') sortedWords;
}