Skip to content

fix: make table filter does-not-contain case-insensitive - #13487

Merged
tiensonqin merged 2 commits into
masterfrom
logseq/text-not-contains-case-28db
Oct 12, 2026
Merged

tiensonqin merged 2 commits into
masterfrom
logseq/text-not-contains-case-28db

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes logseq/db-test#1322

Table filter does not contain was case-sensitive while contains was not. A block with note Apple matched both contains "apple" and does not contain "apple".

Cause

In deps/db/src/logseq/db/common/view.cljs:

  • match-text-or-number-clause (tag / All Pages tables) lower-cased both sides for :text-contains and neither side for :text-not-contains
  • row-matched? (query tables) did the same

Fix

Share a text-contains? helper that lower-cases both sides, and use it for :text-contains and :text-not-contains on both paths.

Tests

  • Tag table (:class-objects): note Apple with contains/does-not-contain "apple"
  • Query table (:query-result / row-matched?): same pair

Exactly one of the two filters shows the block.

Open in Web Open in Cursor 

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@megayu
megayu force-pushed the logseq/text-not-contains-case-28db branch from bbef3d5 to 986d304 Compare October 12, 2026 02:15
@tiensonqin
tiensonqin merged commit 93d19b6 into master Oct 12, 2026
@tiensonqin
tiensonqin deleted the logseq/text-not-contains-case-28db branch October 12, 2026 02:18
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.

Table filter "does not contain" is case-sensitive while "contains" is not

3 participants