MrHertal / react-admin-amplify

AWS Amplify data provider for react-admin.
MIT License
159 stars 42 forks source link

How to display active or inactive drivers using AmplifyFilter #74

Open rayshi67 opened 2 years ago

rayshi67 commented 2 years ago

Hi @MrHertal,

Thank you for the great work on react-admin-amplify. And I am currently building a prototype application based on it.

I was wondering if you could shed some lights on how to implement a filter of dropdown box that can be used to list only the active, inactive, or all drivers respectively for the following Driver type,

type Driver
  @model(timestamps:{createdAt: "createdOn", updatedAt: "updatedOn"})
  @auth(rules: [
    {allow: private}
  ])
  @key(name: "byFirstName", fields: ["firstName", "id"], queryField: "driversByFirstName")
  @key(name: "byLastName", fields: ["lastName", "id"], queryField: "driversByLastName") {
  id: ID!
  firstName: String!
  lastName: String!
  startDate: AWSDateTime!
  endDate: AWSDateTime!
}

Is the above filter currently supported in react-admin-amplify? If not, what would be the best way to have this implemented?

Thanks in advance Ray