Add filtering by extra fields in API and frontendExtra field filter#904
Open
piitaya wants to merge 2 commits intoDonkie:masterfrom
Open
Add filtering by extra fields in API and frontendExtra field filter#904piitaya wants to merge 2 commits intoDonkie:masterfrom
piitaya wants to merge 2 commits intoDonkie:masterfrom
Conversation
|
This is great. I hope it gets merged, this would help with paxx12/SnapmakerU1-Extended-Firmware#364! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for filtering entities (vendors, filaments, spools) by their extra fields.
API
The list endpoints (
GET /vendor,GET /filament,GET /spool) now acceptextra.<key>=<value>query parameters. Same conventions as existing filters (partial match, comma-separated OR, quoted exact match, empty for missing).Example:
GET /api/v1/spool?extra.tag=productionFrontend
Extra fields of type choice and boolean now have filter dropdowns in the table columns.
Related
Similar goal as #773 but takes a smaller, lower-risk approach (~360 lines vs ~1700). Reuses existing filter patterns with no new modules. I'm fine with closing my PR if you think we should go for #773
This PR does not include sorting by extra fields or advanced filtering (text input, number ranges, date pickers). These can be added in follow-up PRs without breaking changes.