Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mfshao
Copy link
Contributor

@mfshao mfshao commented May 15, 2020

This PR fulfills https://ctds-planx.atlassian.net/browse/PXP-4733

Let filters in data explorer support nested fields

To add a nested field to filter, just denote it with a .
Example:

  "filters": {
    "tabs": [
      {
        "title": "Subject",
        "fields": [
          "project_id",               --> a regular field
          "visits.visit_label"      --> a nested field
        ]
      }
    ]
  },

By default any . and/or _ will be converted to whitespaces and the character immediately after that will be captialized, e.g.: visits.visit_label will be displayed as Visits Visit Label.
To overwrite, use fieldMapping,
Example:

  "guppyConfig": {
    "dataType": "subject",
    "fieldMapping": [
      {"field": "visits.days_to_visit", "name": "Nested Days to Visit"}
    ]
  }

Deployed in https://qa-mickey.planx-pla.net/explorer

New Features

  • Let filters in data explorer support nested fields

Improvements

  • Selected filters will always show before unselected ones in filter sections

@em-ingram em-ingram self-requested a review May 19, 2020 18:40
Copy link
Contributor

@em-ingram em-ingram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mfshao mfshao merged commit 804068a into master May 28, 2020
@mfshao mfshao deleted the feat/nested-explorer-filter branch May 28, 2020 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants