Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow filtering of table select column label #36755

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

jacquesikot
Copy link
Contributor

@jacquesikot jacquesikot commented Oct 8, 2024

Description

Problem
When filtering a table with a select column type, users expect to filter by the visible label values shown in each cell. Currently, however, filtering is applied to the underlying option values rather than the displayed labels, leading to unexpected filter results for end-users.

Root Cause
In a previous update (PR #35124), the table cell display for select columns was changed to show labels instead of values. However, the filtering logic was not updated accordingly, so the table still filtered on the original option values, creating a mismatch between displayed and filtered content.

Solution
This PR modifies the displayedRow property within the table widget to use the label property instead of the value key when filtering or searching select column data. This ensures that table filtering and searching now align with the visible label values in the select columns, providing a more intuitive user experience.

Fixes #36635

Automation

/ok-to-test tags="@tag.Sanity, @tag.Table, @tag.Select, @tag.Binding"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11234735437
Commit: fd6c179
Cypress dashboard.
Tags: @tag.Sanity, @tag.Table, @tag.Select, @tag.Binding
Spec:


Tue, 08 Oct 2024 12:48:01 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced a new test case to verify filtering functionality for the "role" column in the Table Widget.
    • Enhanced filtering mechanism to support multiple label values for select columns.
  • Bug Fixes

    • Removed outdated search functionality to streamline user experience.
  • Refactor

    • Restructured existing test cases for improved clarity and flow.

Copy link
Contributor

coderabbitai bot commented Oct 8, 2024

Walkthrough

The pull request introduces modifications to the Cypress end-to-end tests for the Table Widget, specifically focusing on filtering functionality for select column types. A new test case is added to verify filtering by the "role" column. Additionally, changes are made to the getFilteredTableData function in the TableWidgetV2 component, enhancing how label values for select columns are processed during filtering. The overall structure of the tests is streamlined while ensuring existing filtering conditions remain intact.

Changes

File Path Change Summary
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts Added a new test case for filtering by "role" column; removed previous search functionality; streamlined existing tests.
app/client/src/widgets/TableWidgetV2/widget/derived.js Modified getFilteredTableData to handle multiple label values for select columns; updated displayed row construction and filtering logic.

Assessment against linked issues

Objective Addressed Explanation
Use label values for filtering in select columns (Issue #36635)

Possibly related PRs

Suggested labels

Bug, Table Widget, Test

Suggested reviewers

  • ApekshaBhosale
  • rahulbarwal
  • sagar-qa007

🎉 In the realm of code, where logic does dwell,
A filter was born, and it works oh so well!
From values to labels, the change was quite neat,
Now searching for roles is an effortless feat!
With tests all aligned, and structure refined,
The Table Widget shines, leaving bugs far behind! 🌟


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 04114d3 and fd6c179.

📒 Files selected for processing (1)
  • app/client/src/widgets/TableWidgetV2/widget/derived.js (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/widgets/TableWidgetV2/widget/derived.js

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jacquesikot jacquesikot added the ok-to-test Required label for CI label Oct 8, 2024
@github-actions github-actions bot added Bug Something isn't working Community Reported issues reported by community members Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Production Table Widget V2 Issues related to Table Widget V2 Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets labels Oct 8, 2024
@jacquesikot jacquesikot removed Bug Something isn't working Widgets Product This label groups issues related to widgets Production Community Reported issues reported by community members Needs Triaging Needs attention from maintainers to triage Medium Issues that frustrate users due to poor UX Table Widget V2 Issues related to Table Widget V2 labels Oct 8, 2024
@github-actions github-actions bot added Enhancement New feature or request Bug Something isn't working Community Reported issues reported by community members Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Production labels Oct 8, 2024
@github-actions github-actions bot added Production Table Widget V2 Issues related to Table Widget V2 Widgets Product This label groups issues related to widgets labels Oct 8, 2024
@jacquesikot jacquesikot added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Oct 8, 2024
@github-actions github-actions bot added Bug Something isn't working and removed Bug Something isn't working labels Oct 8, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts (1)

179-187: Class, let's review this new test case together.

Good job on adding a new test case to verify the table filter for select column type. However, there are a few areas where we can improve:

  1. The featureFlagIntercept call should be moved to a before or beforeEach hook. This way, we ensure the feature flag is set before each test, improving test isolation.

  2. Let's add some comments to explain what the test is doing. For example:

    // Set up the table filter for the 'role' column
    table.OpenNFilterTable("role", "is exactly", "Product Manager");
    
    // Verify that the first two rows contain "Product Manager" in the role column
    table.ReadTableRowColumnData(0, 2, "v2").then(($cellData) => {
      expect($cellData).to.eq("Product Manager");
    });
  3. Consider adding a check to ensure that no other roles are present in the filtered results.

Remember, clear comments and thorough checks make for a better learning experience for everyone!

app/client/src/widgets/TableWidgetV2/widget/derived.js (1)

Line range hint 1-1176: Class, let's summarize what we've learned today.

We've made some important improvements to our table widget, specifically in how we handle filtering for select columns. Here's a quick recap:

  1. We've introduced a new way to store and use label values for select columns, making our filtering more user-friendly.
  2. Our code now handles different types of select options, showing good adaptability.
  3. We've integrated these changes smoothly with our existing filtering logic.

These enhancements address the issue raised in our project objectives, allowing users to filter based on the visible labels they see in the table, rather than the underlying values. This is a significant improvement in usability!

However, as with any code changes, we should be vigilant:

  1. We should thoroughly test these changes with different types of data and select column configurations.
  2. We might want to add some comments explaining the purpose and functionality of labelValuesForSelectCell for future reference.
  3. We should consider if this approach scales well for tables with a large number of select columns or with very large datasets.

Remember, good code is not just about solving the immediate problem, but also about maintainability and scalability. Keep up the good work, and don't forget to document your changes!

As we continue to enhance our table widget, we should consider the performance implications of these changes, especially for large datasets. We might want to explore caching strategies or lazy loading techniques to ensure our table remains responsive even with complex select column configurations.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 22ccab0 and 04114d3.

📒 Files selected for processing (2)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts (1 hunks)
  • app/client/src/widgets/TableWidgetV2/widget/derived.js (5 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts (1)

Pattern app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:

  • Follow best practices for Cypress code and e2e automation.
  • Avoid using cy.wait in code.
  • Avoid using cy.pause in code.
  • Avoid using agHelper.sleep().
  • Use locator variables for locators and do not use plain strings.
  • Use data-* attributes for selectors.
  • Avoid Xpaths, Attributes and CSS path.
  • Avoid selectors like .btn.submit or button[type=submit].
  • Perform logins via API with LoginFromAPI.
  • Perform logout via API with LogOutviaAPI.
  • Perform signup via API with SignupFromAPI.
  • Avoid using it.only.
  • Avoid using after and aftereach in test cases.
  • Use multiple assertions for expect statements.
  • Avoid using strings for assertions.
  • Do not use duplicate filenames even with different paths.
  • Avoid using agHelper.Sleep, this.Sleep in any file in code.
🔇 Additional comments (2)
app/client/src/widgets/TableWidgetV2/widget/derived.js (2)

Line range hint 687-766: Class, let's examine the improvements made to our table filtering mechanism.

Now, children, we've made some significant changes to how we handle select columns in our table. Let's go through them step by step:

  1. We've introduced a new object called labelValuesForSelectCell to store the labels for our select columns. This is a good practice, as it allows us to keep our data organized.

  2. We're now identifying which columns are of the 'select' type and have options. This shows good attention to detail, doesn't it?

  3. For each select column, we're finding the label that corresponds to the selected value. This is like matching a student's name to their student ID - very important for clarity!

  4. We've added some clever logic to handle different types of select options - both flat arrays and nested arrays. This flexibility is commendable, as it allows our code to work with various data structures.

  5. Finally, we're incorporating these label values into our displayedRow object. This ensures that when we filter or search, we're looking at the human-readable labels rather than just the underlying values.

These changes will make our table much more user-friendly, especially when filtering on select columns. Great job! However, there's always room for improvement. Can anyone suggest how we might make this code even more efficient or readable?


Line range hint 767-860: Let's make sure we're using our new knowledge correctly, class.

Now that we've added our labelValuesForSelectCell object, we need to ensure we're using it properly throughout our filtering process. Can anyone spot where we're using this new object?

That's right! We're incorporating it into our displayedRow object. This is good, but let's double-check a few things:

  1. Are we using displayedRow consistently in our filtering logic? It looks like we are, which is excellent!

  2. Have we considered all possible scenarios? For instance, what happens if a select column doesn't have a matching label?

  3. Could we add some comments to explain the purpose of labelValuesForSelectCell for future students... I mean, developers?

Remember, clear communication in our code is just as important as getting the logic right. It's like showing your work in a math problem - it helps others understand your thinking!

To make sure we haven't missed anything, let's run a quick check:

This will help us ensure we're using our new object correctly throughout the table widget. Any volunteers to run this check and report back to the class?

✅ Verification successful

Let's try running these updated scripts to ensure we correctly identify all instances of labelValuesForSelectCell and verify the consistent use of displayedRow in our filtering logic.


Verification of labelValuesForSelectCell Integration

After reviewing the search results, we can confirm that labelValuesForSelectCell is correctly integrated into the filtering logic within derived.js. Additionally, displayedRow is used consistently throughout the filtering process.

  • labelValuesForSelectCell is properly assigned and utilized in the displayedRow object.
  • No discrepancies were found in how displayedRow is employed in the filtering conditions.

Everything looks good! Great job ensuring that the new object is seamlessly incorporated.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of labelValuesForSelectCell in filtering logic

# Test: Search for labelValuesForSelectCell usage
rg --type javascript 'labelValuesForSelectCell' app/client/src/widgets/TableWidgetV2/

# Test: Check if displayedRow is used consistently in filtering
rg --type javascript 'displayedRow\[.*?\]' app/client/src/widgets/TableWidgetV2/

Length of output: 238


Script:

#!/bin/bash
# Description: Verify the usage of labelValuesForSelectCell in filtering logic without using --type

# Test: Search for labelValuesForSelectCell usage in .js and .jsx files
rg 'labelValuesForSelectCell' app/client/src/widgets/TableWidgetV2/ --glob '*.js' --glob '*.jsx'

# Test: Check if displayedRow is used consistently in filtering within .js and .jsx files
rg 'displayedRow\[' app/client/src/widgets/TableWidgetV2/ --glob '*.js' --glob '*.jsx'

Length of output: 866

@github-actions github-actions bot added Bug Something isn't working and removed Bug Something isn't working labels Oct 8, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (5)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts (1)

179-186: Class, let's review this new test case together.

Alright, students, gather 'round! We have a new addition to our test suite, and it's time to put on our thinking caps. Let's break it down step by step:

  1. The test description is clear and concise. Good job!
  2. We're using a feature flag intercept, which is a smart way to control feature visibility.
  3. The filter is being applied correctly using the OpenNFilterTable method.
  4. We're verifying the results with two assertions, which is excellent for thorough testing.

However, there's room for improvement:

  • We should avoid using plain strings for selectors. Consider using data-* attributes instead.
  • The featureFlagIntercept call could be moved to a before or beforeEach block to keep our test setup clean.

Overall, it's a good effort, but let's strive for excellence! Who wants to volunteer to refactor this test case?

app/client/src/widgets/TableWidgetV2/widget/derived.js (4)

Line range hint 687-766: Let's consider the performance implications of our changes, class.

While our new approach to handling select columns is more comprehensive, we need to be mindful of its impact on performance, especially when dealing with large datasets. The additional processing for each row could potentially slow down our table rendering and filtering operations.

To address this, I suggest we consider the following optimizations:

  1. Memoization: We could memoize the labelValuesForSelectCell object for each row to avoid recalculating it on every filter operation.
  2. Lazy evaluation: Instead of processing all select columns upfront, we could defer the label lookup until it's actually needed for filtering.
  3. Batch processing: For very large datasets, we might want to process rows in batches to avoid blocking the main thread for too long.

Remember, class, optimization is about finding the right balance between functionality and performance. Let's keep an eye on how these changes affect our table's responsiveness, especially with larger datasets.

Would you like me to provide some code examples for these optimizations?


Line range hint 719-758: Let's discuss error handling and edge cases, class.

In our enthusiasm to improve our select column handling, we must not forget about potential pitfalls. Our code now handles various formats of selectOptions, but we should be prepared for any unexpected scenarios. Let's consider adding some additional error handling:

  1. Empty selectOptions: We should gracefully handle cases where selectOptions is an empty array or object.
  2. Malformed data: If the selectOptions data is not in the expected format, our code should not throw an error.
  3. Missing labels or values: We should have a fallback for cases where a label or value is missing from an option.

Here's an example of how we might improve our error handling:

if (isSelectOptionsAnArray) {
  const selectOptionKey = primaryColumns[key].alias;
  
  try {
    if (_.some(primaryColumns[key].selectOptions, _.isArray)) {
      selectOptions = primaryColumns[key].selectOptions[row.__originalIndex__] || [];
    } else {
      selectOptions = primaryColumns[key].selectOptions;
    }
    
    const option = selectOptions.find((option) => option && option.value === value);
    
    if (option && option.label) {
      labelValuesForSelectCell[selectOptionKey] = option.label;
    } else {
      labelValuesForSelectCell[selectOptionKey] = value; // Fallback to value if label is missing
    }
  } catch (error) {
    console.error(`Error processing select options for ${key}:`, error);
    labelValuesForSelectCell[selectOptionKey] = value; // Fallback to value in case of any error
  }
} else {
  // Similar error handling for non-array selectOptions...
}

Remember, class, robust error handling is key to creating reliable software. Always prepare for the unexpected!

Shall we implement these additional safeguards to make our code more resilient?


Line range hint 687-766: Let's talk about code organization and maintainability, class.

Our getFilteredTableData function has grown quite complex with these new changes. While it's functioning well, we should consider refactoring to improve its maintainability and readability. Here are some suggestions:

  1. Extract the select option processing logic into a separate function:
function getSelectOptionLabel(column, row, value) {
  const selectOptions = getSelectOptions(column, row);
  const option = selectOptions.find(opt => opt.value === value);
  return option ? option.label : value;
}

function getSelectOptions(column, row) {
  if (_.isArray(column.selectOptions)) {
    return _.some(column.selectOptions, _.isArray)
      ? column.selectOptions[row.__originalIndex__]
      : column.selectOptions;
  }
  return JSON.parse(column.selectOptions);
}
  1. Simplify the main function by using these helper functions:
selectColumnKeys.forEach((key) => {
  const column = primaryColumns[key];
  const value = row[key];
  const selectOptionKey = column.alias;
  
  labelValuesForSelectCell[selectOptionKey] = getSelectOptionLabel(column, row, value);
});
  1. Consider creating a separate class or module for handling select options if this logic is used elsewhere in the codebase.

By breaking down our complex logic into smaller, more manageable pieces, we make our code easier to understand, test, and maintain. Remember, class, clean code is happy code!

Shall we implement these refactoring suggestions to improve our code structure?


Line range hint 687-766: Let's summarize our lesson on improving the getFilteredTableData function, class.

We've made significant strides in enhancing our table's filtering capabilities, particularly for select columns. Our new approach allows us to filter based on visible labels rather than underlying values, which will greatly improve the user experience.

Here's a quick recap of our findings:

  1. Functionality: The changes successfully address the issue of filtering select columns by label.
  2. Performance: We've identified potential performance concerns and suggested optimizations like memoization and lazy evaluation.
  3. Error Handling: We've recommended additional error handling to make our code more robust against unexpected data.
  4. Maintainability: We've suggested refactoring to improve code organization and readability.

Overall, these changes are a positive step forward. However, there's always room for improvement in software development. I encourage you all to consider implementing the suggested optimizations and refactoring to make this good solution even better.

Remember, class, coding is an iterative process. We should always strive to improve our work, making it more efficient, robust, and maintainable. Keep up the good work!

Does anyone have any questions about our review or suggestions for further improvements?

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 22ccab0 and 04114d3.

📒 Files selected for processing (2)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts (1 hunks)
  • app/client/src/widgets/TableWidgetV2/widget/derived.js (5 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter1_1_Spec.ts (1)

Pattern app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:

  • Follow best practices for Cypress code and e2e automation.
  • Avoid using cy.wait in code.
  • Avoid using cy.pause in code.
  • Avoid using agHelper.sleep().
  • Use locator variables for locators and do not use plain strings.
  • Use data-* attributes for selectors.
  • Avoid Xpaths, Attributes and CSS path.
  • Avoid selectors like .btn.submit or button[type=submit].
  • Perform logins via API with LoginFromAPI.
  • Perform logout via API with LogOutviaAPI.
  • Perform signup via API with SignupFromAPI.
  • Avoid using it.only.
  • Avoid using after and aftereach in test cases.
  • Use multiple assertions for expect statements.
  • Avoid using strings for assertions.
  • Do not use duplicate filenames even with different paths.
  • Avoid using agHelper.Sleep, this.Sleep in any file in code.
🔇 Additional comments (1)
app/client/src/widgets/TableWidgetV2/widget/derived.js (1)

Line range hint 687-766: Class, let's examine the improvements made to our getFilteredTableData function.

Now, children, we've made some significant changes to how we handle select columns. Instead of using a single labelValueForSelectCell variable, we've introduced a more comprehensive labelValuesForSelectCell object. This allows us to store multiple label values for different select columns, which is a much more organized approach.

Let's break down the changes:

  1. We've added a new array called selectColumnKeys to keep track of columns that are of type 'select' and have select options.
  2. We're now iterating over these selectColumnKeys to find the label value for each select column in every row.
  3. We've improved our handling of different types of selectOptions, whether they're arrays, nested arrays, or JSON strings.
  4. Finally, we're spreading the labelValuesForSelectCell object into our displayedRow object, which allows us to include all label values when filtering.

These changes will greatly enhance our ability to filter and search based on the visible labels in select columns, rather than just the underlying values. Well done, class!

@jacquesikot
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Oct 8, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11233264809.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 36755.
recreate: .

Copy link

github-actions bot commented Oct 8, 2024

Deploy-Preview-URL: https://ce-36755.dp.appsmith.com

rahulbarwal
rahulbarwal previously approved these changes Oct 8, 2024
Copy link
Contributor

@rahulbarwal rahulbarwal left a comment

Choose a reason for hiding this comment

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

Lets update all the comments. Otherwise good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Community Reported issues reported by community members Enhancement New feature or request Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Production Table Widget V2 Issues related to Table Widget V2 Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Table with select column search and filter over the value, not over the label
3 participants