Filtering a Ext.data.Store by a particular id returns multiple results

前端 未结 2 1009
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-16 06:33

I\'m trying to filter my list of auditions by show ID but when the show ID is \'1\' all auditions that have a show Id of \'1x\' are being returned. Below is my code.

2条回答
  •  别那么骄傲
    2021-01-16 07:18

    Also have you tried

    app.stores.auditions.filter({
        property: 'show_id',
        value: show.id,
        exactMatch: true
    });
    

    or

    app.stores.auditions.filterBy(function(record, id) {
        return store.id = id;
    }, this);
    

    Or if you just want to get that specific record;

    var record = app.stores.auditions.getAt(app.stores.auditions.findExact('store_id', store.id));
    

提交回复
热议问题