Clean up meas search a bit

This commit is contained in:
Matthew Dillon 2015-06-12 12:40:28 -08:00
parent 62426cff9d
commit a354ecd639
4 changed files with 7 additions and 15 deletions

View file

@ -1,18 +1,15 @@
import Ember from 'ember';
export default Ember.Component.extend({
isLoading: false,
actions: {
search: function() {
this.set('isLoading', true);
let strain = this.get('selectedStrain');
let characteristic = this.get('selectedCharacteristic');
if ((strain === 'all') && (characteristic === 'all')) {
this.store.findAll('measurement').then((measurements)=>{
this.set('measurements', measurements);
});
this.set('isLoading', false);
return false;
return;
}
let search = {};
if (strain !== 'all') {
@ -24,8 +21,6 @@ export default Ember.Component.extend({
this.store.find('measurement', search).then((measurements)=>{
this.set('measurements', measurements);
});
this.set('isLoading', false);
return false;
}
},
});

View file

@ -10,7 +10,7 @@
</div>
{{#if isLoading}}
{{!-- This doesn't work yet --}}
{{!-- This doesn't work yet, something is blocking --}}
{{loading-panel}}
{{else}}
<table class="flakes-table">