Skip to content

Add filter patterns #2403

Closed
Closed
@mtrezza

Description

@mtrezza

New Feature / Enhancement Checklist

Current Limitation

Combinations of filters that are set in the data browser are lost when navigating away or reloading the dashboard.

Feature / Enhancement Description

Add feature to set preset filter patterns via filter dialog and preset filter patterns via dashboard configuration.

Example Use Case

A filter pattern that finds objects in the _User class where createdAt >= 10 days ago && updatedAt <= 1 day ago

The filer dialog could look like this, with existing buttons less verbose, so there is enough space for a 4th button:

image

The dashboard config could look like this:

const dashboard = ParseDashboard({
  filters: [
      {
         title: 'Recently deleted users', // The filer pattern title in the filter menu
         classes: ['_User'] // The classes for which the filter will be available; should accept regex to allow for all with `.*`
         filter: [ // The filter pattern as array (is filter order preserved)?
           {
             key: 'createdAt',
             condition: 'gte', // Reuse the syntax that is already used internally
             value: '2022-03-01T00:00:00.000Z'
           },
           {
             key: 'updatedAt',
             condition: 'lte', // Reuse the syntax that is already used internally
             value: '2022-03-10T00:00:00.000Z'
           }
         ]
      }
  ],
});

Alternatives / Workarounds

Enter filter pattern manually (status quo).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$100Bounty applies for fixing this issue (Parse Bounty Program)type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions