Skip to content

Filter category is reset when an "select" or "multi-select" filter is selected #8

@carlosthe19916

Description

@carlosthe19916

Issue

If category dropdown is reset whenever any "select" or "multi-select" option is selected

How to reproduce it

configure the useTableState with a configuration similar to:

filter: {
  isEnabled: true,
  filterCategories: [
    {
      key: "filterText",
      title: "Filter text",
      placeholderText: "Search",
      type: FilterType.search,
    },
    {
      key: "severity",
      title: "Severity",
      placeholderText: "Severity",
      type: FilterType.multiselect,
      selectOptions: [
        { key: "low", value: "Low" },
        { key: "moderate", value: "Moderate" },
        { key: "important", value: "Important" },
        { key: "critical", value: "Critical" },
      ],
    },
  ],
},
  • Then try to select a filter of the FilterType.multiselect and once you select an option then the main filter category selector will be reset to FilterText instead of keep the original category selector
Screencast.from.2024-02-20.09-26-26.webm

I know this repository is under development and I don't expect this to be solved ASAP, but I wanted to write my findings somewhere as I find this repository extremely useful for Patternfly UI developers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions