Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Override filtration #711

Closed
Dergash opened this issue Sep 30, 2021 · 0 comments
Closed

Override filtration #711

Dergash opened this issue Sep 30, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Dergash
Copy link
Member

Dergash commented Sep 30, 2021

There are cases when filtration for the field should work in a non-standard way: for example, a picklist field sometimes needs to be searched by substring instead of selecting values from the list.

Proposed solution is to have two fields: one for display purposes and another for filtration purposes. The second field is supposed to be hidden, but its key and type are used to decide on filtration control and logic for displayed purposes.

Proposed schema extension:

export interface WidgetFieldBase {

  // ...

  /**
    * When assigned with another field key, this another will be used for filtration purposes 
   */
  filterBy?: string
}

Configuration example:

// example.widget.json
{

    // ...

    "fields": [
      {
        "title": "Address",
        "key": "address",
        "type": "input",
        "filterBy": "addressFilter"
      },
      {
        "title": "Address Specified",
        "key": "addressFilter",
        "hidden": true,
        "type": "checkbox"
      }
    ]
  }
@Dergash Dergash added the enhancement New feature or request label Sep 30, 2021
@Dergash Dergash self-assigned this Sep 30, 2021
Dergash added a commit to tesler-platform/tesler-schema that referenced this issue Sep 30, 2021
Dergash added a commit to tesler-platform/tesler-schema that referenced this issue Sep 30, 2021
Dergash added a commit that referenced this issue Sep 30, 2021
…rmine if some other field should be used for displaying filtration control (#711)
Dergash added a commit to tesler-platform/tesler-schema that referenced this issue Sep 30, 2021
Dergash added a commit that referenced this issue Oct 7, 2021
…rmine if some other field should be used for displaying filtration control (#711)
Dergash added a commit that referenced this issue Oct 7, 2021
…rmine if some other field should be used for displaying filtration control (#711)
Dergash added a commit that referenced this issue Oct 7, 2021
…rmine if some other field should be used for displaying filtration control (#711)
Dergash added a commit that referenced this issue Oct 7, 2021
…rmine if some other field should be used for displaying filtration control (#711)
@Dergash Dergash added this to the 1.33.0 milestone Oct 13, 2021
@Dergash Dergash closed this as completed Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant