Skip to content

Inverse Search in Filter-Control#7937

Closed
ghost wants to merge 2 commits into
developfrom
unknown repository
Closed

Inverse Search in Filter-Control#7937
ghost wants to merge 2 commits into
developfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Aug 18, 2025

🤔Type of Request

  • Bug fix
  • New feature
  • Improvement
  • Documentation
  • Other

🔗Resolves an issue?
It does not resolve an issue in the Filter Control extension, but it adds the ability to do an inverse search.

📝Changelog

By prepending a keyword with [!], this keyword gets excluded from the list. It uses AND logic and can be combined with the regular filtering provided by Filter Control.

  • Core
  • Extensions

For example, let's take the latest CVEs published by NVD:

image

The user is interested in vulnerabilities related to memory:

image

However, the user is not interested in Linux, and excludes these results:

image

💡Example(s)?
A demo is available at https://live.bootstrap-table.com/code/0x164C9DFC/18990, albeit with a reduced dataset.
The demo also features a customSearch function offering the same functionality to the regular search provided by Bootstrap-Table.

☑️Self Check before Merge

⚠️ Please check all items below before reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

I have no updated the documentation. No new customizable parameters were introduced. [!] is hardcoded and the algorithm modified accordingly to fit my use-case. If you think this is a useful improvement, please modify as you seem fit for the project.

@ghost ghost closed this May 1, 2026
@wenzhixin
Copy link
Copy Markdown
Owner

Sorry for the delayed response! This extension was not originally maintained by me, so I haven't been able to review it in a timely manner.

I just took a look — this is a nice feature improvement. However, there are a couple of concerns:

  1. Breaking change (OR → AND): The original multi-keyword logic uses OR (any match passes), but this PR changes it to AND (all keywords must match). This would break existing behavior for users relying on the OR logic.
  2. Hardcoded magic string ([!]): The [!] prefix is hardcoded, which could conflict with actual data containing that pattern. It would be better to make it a configurable option.

If you'd like to pursue this, I'd suggest making the exclude prefix configurable and keeping the original OR behavior as the default to avoid breaking changes.

Thank you for your contribution!

This pull request was closed.
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.

1 participant