Filter DataInstanceStore by Attribute

Is there a way to apply a filter to a dataInstanceStore? For example in the Car component below, is there a way to search on a specific attribute of Car on the dataInstance?

export class Car extends React.Component{

dataInstance=instance(Car.NAME,{
view:"_local"
})

{…rest of code}
}

Hi, @mmckenzie

DataInstanceStore is used to load instance by id. So you could not apply filter to it.

To load collection of instances filtered by attribute could be used DataCollectionStore with EntityFilter:

  byModelFilter: EntityFilter = {
    conditions: [{
      property: 'model',
      operator: 'contains',
      value: 'm0'
    }]
  };

  dataCollection = collection<Car>(Car.NAME, {
    view: "car-edit",
    loadImmediately: false,
    filter: this.byModelFilter
  });