Skip to content

List action returns both records with status Active and Inactive when search only for Active #105

Open
@geekyayush

Description

@geekyayush

I have a number of records in my collection; some have "Active" in status property and others have "Inactive".

In AdminJS frontend, when I filter status field to show me only "Active" status records, it returns both Active and Inactive. For Inactive status filter, it works fine.

I believe the reason could be in file "src/utils/convert-filter.ts", line number 19.
Link; https://github.com/SoftwareBrothers/adminjs-mongoose/blob/master/src/utils/convert-filter.ts#L19

It's searching a property using regex, which returns both Active and Inactive since both values contain "Active".

Is there any workaround we can do to make sure only either Active or Inactive records get returned by the list action?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions