Skip to content

Fix global search "view all results" omitting notes matches - #12832

Merged
SchrodingersGat merged 1 commit into
inventree:masterfrom
wyyd-yxc:fix/12482-notes-search-table
Sep 12, 2026
Merged

SchrodingersGat merged 1 commit into
inventree:masterfrom
wyyd-yxc:fix/12482-notes-search-table

Conversation

@wyyd-yxc

@wyyd-yxc wyyd-yxc commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Problem

When global search has the "notes search" setting enabled, results whose notes match the search term appear correctly in the search drawer - but clicking "view all results" for that model opens the results table without those matches (reported in #12482, with reproduction steps).

Root cause

The search drawer calls the API search endpoint with search_notes: true, but the "view all results" link only carries the plain search term to the overview table:

const url = `${overviewUrl}?search=${searchText}`;

The overview table's list endpoint only searches notes when it receives the search_notes query parameter (supported by InvenTreeSearchFilter), so note-only matches were dropped from the table view.

Solution

Pass the drawer's active notes-search state through to the overview URL:

  • QueryResultGroup receives a searchNotes prop from the drawer
  • viewResults() appends &search_notes=true when notes search is active
  • The table already forwards URL query parameters to the API, where the existing search_notes support does the rest

Testing

  • yarn run build (full tsc typecheck + vite build) passes
  • Reproduction path: add a unique string to the notes field of some parts, enable notes search in the global search settings, search for it, click "view all results" for parts - the table now includes the note matches (previously empty/omitted)
  • With notes search disabled, the URL is unchanged from before

Closes #12482

…e#12482)

The search drawer searches notes when the notes-search setting is
enabled, but the "view all results" link only carried the plain
search term - so results that matched only via their notes were
missing from the full results table.

Pass the search_notes flag through to the overview table URL when
notes search is active; the table forwards URL query parameters to
the API, where InvenTreeSearchFilter already supports search_notes.
@netlify

netlify Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 2221ec8
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6aa184e5fb4a8f0008be9a57
😎 Deploy Preview https://deploy-preview-12832--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🔴 down 1 from production)
Accessibility: 82 (no change from production)
Best Practices: 92 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@matmair matmair added bug Identifies a bug which needs to be addressed User Interface Related to the frontend / User Interface labels Sep 9, 2026
@matmair matmair added this to the 1.6.0 milestone Sep 9, 2026
@SchrodingersGat
SchrodingersGat merged commit 27f89d2 into inventree:master Sep 12, 2026
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Identifies a bug which needs to be addressed User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global search for notes omitting results from table view.

3 participants