codeledge / ra-tools

React Admin Tools, namely the Prisma Data Adapter
67 stars 19 forks source link

Type for GetListRequest is incorrect #72

Closed gauthierm closed 1 year ago

gauthierm commented 1 year ago

This type expects a top-level filter as well as a filter in the params. React Admin only sends the filter in params like:

{
  method: 'getList',
  resource: 'posts',
  params: {
    pagination: {
      page: 1,
      perPage: 10
    },
    sort: {
      field: 'id',
      order: 'ASC'
    },
    filter: {}
  }
}

The top-level filter property should be removed so type checks work properly.

ogroppo commented 1 year ago

Good shout, removing now!

ogroppo commented 1 year ago

Removed in ra-data-simple-prisma@3.1.2