SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js

Home Page:https://adminjs.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I query a record or a list of records with exact matching property values?

eakenbor opened this issue · comments

Contact Details

No response

What happened?

I want a situation where only the record or records with the exact property match are returned, instead of those with partial match. For instance, if a record has a property name "field1" and the property value for that that "field1" is "abcdef". If the input value is "abc", that record should not be returned. It should only be returned when the input value is exactly "abcdef".

What I did below does not work. Please how can I achieve this?

const api = new ApiClient()
  api
      .resourceAction({
        resourceId: 'User',
        actionName: 'search',
        query: email,
        params: {
          'filters.email': props.record.params.email
        }
      })
.then(...)

Bug prevalence

Every time

AdminJS dependencies version

"adminjs": "^7.0.5",

What browsers do you see the problem on?

No response

Relevant log output

No response

Relevant code that's giving you issues

No response