Skip to content

[plugin] Render tables - #11733

Merged
SchrodingersGat merged 20 commits into
inventree:masterfrom
SchrodingersGat:table-props
Apr 13, 2026
Merged

SchrodingersGat merged 20 commits into
inventree:masterfrom
SchrodingersGat:table-props

Conversation

@SchrodingersGat

@SchrodingersGat SchrodingersGat commented Apr 12, 2026 •

Copy link
Copy Markdown
Member

This PR exposes the complex "table rendering" framework to the plugin context, allowing plugins to render table data directly from API calls, rather than having to recreate this effort each time.

This is still a heavy WIP and has not been tested on a plugin yet.

Tested Features

  • Custom API filters
  • Enable / disable individual columns
  • Table search
  • Table refresh
  • Select rows
  • Embedded row actions
  • Right click row actions
  • Support dark mode

Tasks

  • Add sample code to the plugin creator tool
  • Add documentation
  • Release new version of @inventreedb/ui to NPM

Example

Rendered directly out of the plugin creator tool using default code:

image

@SchrodingersGat
SchrodingersGat marked this pull request as draft April 12, 2026 12:17
@netlify

netlify Bot commented Apr 12, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 6dac2c3
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/69dcb59a6339d100087959ab
😎 Deploy Preview https://deploy-preview-11733--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 (🟢 up 1 from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem User Interface Related to the frontend / User Interface labels Apr 12, 2026
@SchrodingersGat SchrodingersGat added this to the 1.4.0 milestone Apr 12, 2026
@SchrodingersGat
SchrodingersGat marked this pull request as ready for review April 13, 2026 05:31
@SchrodingersGat SchrodingersGat added backport Apply this label to a PR to enable auto-backport action backport-to-1.3.x labels Apr 13, 2026
- Function needs to be defined with the context menu provider
@SchrodingersGat
SchrodingersGat merged commit 23f43ff into inventree:master Apr 13, 2026
27 checks passed
@SchrodingersGat
SchrodingersGat deleted the table-props branch April 13, 2026 10:36
@codecov

codecov Bot commented Apr 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.34%. Comparing base (27ce60d) to head (6dac2c3).
⚠️ Report is 375 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11733   +/-   ##
=======================================
  Coverage   91.34%   91.34%           
=======================================
  Files         967      967           
  Lines       50272    50272           
=======================================
  Hits        45922    45922           
  Misses       4350     4350           
Components Coverage Δ
Backend Apps 91.70% <ø> (ø)
Backend General 93.40% <ø> (ø)
Frontend ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

github-actions Bot pushed a commit that referenced this pull request Apr 13, 2026
* Move useFilterSet state to the @lib

* Refactor useTable hook into @lib

* Refactor string helper functions

* Refactor constructFormUrl func

* Refactor Boundary component

* Refactor StoredTableState

* More refactoring

* Refactor CopyButton and CopyableCell

* Pass table render func to plugins

* Provide internal wrapper function, while allowing the "api" and "navigate" functions to be provided by the caller

* Adds <InvenTreeTable /> component which is exposed to plugins

* Update frontend versioning

* Update docs

* Handle condition where UI does not provide table rendering function

* Move queryFilters out of custom state

* Fix exported type

* Extract searchParams

- Cannot be used outside of router component
- Only provide when the table is generated internally

* Bump UI version

* Fix for right-click context menu

- Function needs to be defined with the context menu provider

(cherry picked from commit 23f43ff)
@github-actions

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 1.3.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat added a commit that referenced this pull request Apr 13, 2026
* Move useFilterSet state to the @lib

* Refactor useTable hook into @lib

* Refactor string helper functions

* Refactor constructFormUrl func

* Refactor Boundary component

* Refactor StoredTableState

* More refactoring

* Refactor CopyButton and CopyableCell

* Pass table render func to plugins

* Provide internal wrapper function, while allowing the "api" and "navigate" functions to be provided by the caller

* Adds <InvenTreeTable /> component which is exposed to plugins

* Update frontend versioning

* Update docs

* Handle condition where UI does not provide table rendering function

* Move queryFilters out of custom state

* Fix exported type

* Extract searchParams

- Cannot be used outside of router component
- Only provide when the table is generated internally

* Bump UI version

* Fix for right-click context menu

- Function needs to be defined with the context menu provider

(cherry picked from commit 23f43ff)

Co-authored-by: Oliver <[email protected]>
martonmiklos pushed a commit to martonmiklos/InvenTree that referenced this pull request Jun 30, 2026
* Move useFilterSet state to the @lib

* Refactor useTable hook into @lib

* Refactor string helper functions

* Refactor constructFormUrl func

* Refactor Boundary component

* Refactor StoredTableState

* More refactoring

* Refactor CopyButton and CopyableCell

* Pass table render func to plugins

* Provide internal wrapper function, while allowing the "api" and "navigate" functions to be provided by the caller

* Adds <InvenTreeTable /> component which is exposed to plugins

* Update frontend versioning

* Update docs

* Handle condition where UI does not provide table rendering function

* Move queryFilters out of custom state

* Fix exported type

* Extract searchParams

- Cannot be used outside of router component
- Only provide when the table is generated internally

* Bump UI version

* Fix for right-click context menu

- Function needs to be defined with the context menu provider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Apply this label to a PR to enable auto-backport action enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant