| Crates.io | egui_deferred_table |
| lib.rs | egui_deferred_table |
| version | 0.1.5 |
| created_at | 2025-09-01 07:21:41.591018+00 |
| updated_at | 2025-09-20 22:53:03.048294+00 |
| description | An egui table, where the number of rows/columns is deferred |
| homepage | https://github.com/MakerPnP/egui_deferred_table |
| repository | https://github.com/MakerPnP/egui_deferred_table |
| max_upload_size | |
| id | 1819232 |
| size | 248,172 |
Another egui table system, for comparisons to other popular egui crates, see below.
Why? Existing crates either don't have all the features and/or do not perform well and/or have sub-optimal APIs for creating desktop-focussed productivity-style applications.
Attention is paid to defining topics of code, as below. For most UI apps there are three distinct topics, as follows.
egui_deferred_table has the concept of a data-source which is used to manage data retrieval, and there are blanket implementations
for various tuples. e.g. vec![("example", 42.0_f32, true)].
Due to the flexible nature of data sources, you can implement your own caching/fetching/conversion functions in a way that
is suitable for your application, for instance, if the data type holds type T with some properties, and conversion of
properties to a display format is expensive, you can do it just-in-time as the cell is rendered, and then cache the result.
Other table systems force you to convert every value for every cell even if the cell is never rendered.
It's possible to use enums for the data source value, see the growing example which has a two-state enum Loading and Ready(T)
this allows UI's that can show the table at the right size and position while the data is loaded in the background.
For row/column re-ordering, you can handle it by re-ordering the columns for presentation, or you can move/change the underlying data. Compare the 'spreadsheet' and 'sparse' demo's handling of row/column drag/drop actions.
When a user interacts with the table, a vec of Action is returned so that your code can handle them appropriately.
Rendering code is separated from data-source related code.
It's possible to use the same data-source, but with different renderers, see the 'projections' demo for an example.
The API is designed so that there is no embedded strings, and so that the use of i18n is not prevented or difficult when rendering rows/columns/cells. Indeed, there are apps using the egui_i18n crate along with this crate. If this crate ever evolves to needing strings, i18n support will be baked-in/abstracted.
This crate is work-in-progress, it aims to provide a 'batteries-included' solution that works for many different sources of table data.
| Feature | Status |
|---|---|
| Layout | ✅ Working |
| Variable Row Heights | ✅ Working via API |
| Variable Column Widths | ✅ Working via API |
| Smooth scrolling | ✅ Working |
| Column Hiding/Row Filtering | ✅ Working via API |
| Column re-ordering | ✅ Working |
| Row re-ordering | ✅ Working |
| Column/Row re-size handles | ✅ Working |
| Sorting UI | 🚧 Not-started (*1) |
| Filtering UI | 🚧 Not-started (*2) |
*1 sorting can be achieved by sorting at the data source or by re-ordering rows, no built-in UI yet. *2 filtering works, but there's no built-in UI yet.
See demos folder.
Demos include examples of data sources using spreadsheets, background-loaded, sparse data sources, vec! data sources.
Demos include simple and complex UIs, check out the 'docking' example which combines many of the other examples into a single demo
which uses egui_dock tabs and windows for each demo.
The 'spreadsheet' demo is a working spreadsheet, with formulas and cell re-calculation.
Available under APACHE or MIT licenses.
Possible log types:
[added] for new features.[changed] for changes in existing functionality.[deprecated] for once-stable features removed in upcoming releases.[removed] for deprecated features removed in this release.[fixed] for any bug fixes.[security] to invite users to upgrade in case of vulnerabilities.For API migration details, see the git commit history and study the changes made to the demos.
DeferredTableBuilder in favor of a solution that allows caching of the column parameters on an
as-required basis so they do not have to be built every frame.DeferredTableDataSource to DeferredTableRender. This allows multiple projections
(aka 'views') of the same data source using different renderers. See the new 'projections' example.First release
First release
| Crate | Table Grid Renderer | Notes | Auto-size | Selection | Hiding Columns | Sorting | Filtering Rows | Resizable rows | Resizable columns | Variable amount of columns/rows | Reordering Columns | Reordering rows | Performance with 1,000's of rows | API notes |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
egui_deferred_table |
Own | Work-in-progress | No | 🚧 Planned (*8) | ✅ Yes | 🚧 Planned | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ excellent | Very flexible |
egui_table |
Own | egui_table has a "batteries not included" design | ✅ (*1) | ❌ No | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ excellent | Flexible |
egui_extras::Table |
Own | ✅ (*1) | ❌ No | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes | ❗ Yes (*2) | ❌ No | ❌ No | ✅ good | Rigid, unforgiving | |
egui-selectable-table |
egui_extras::Table (*7) | ✅ (*1) | ✅ Yes | ❌ No | ✅ Yes | ❗ (*3) | ❌ No | ✅ Yes | ❗ Yes (*2) | ❌ No | ❌ No | ✅ good | Rigid, unforgiving | |
egui-data-table |
egui_extras::Table (*7) | Comprehensive, but limited. | ✅ (*1) | ✅ Yes | ✅ Yes | ✅ Yes | ❗ (*3) | ❌ No | ✅ Yes | ❗ Yes (*4) | ✅ Yes | ❌ No | ❗ poor (*5) | Very rigid, hard-to-use (*6) |
column to be called at runtime for each column, conditional code in the table definition required to support variable amount of columns, must be paired
with equal amount of calls to header.col, usually requiring repeating the conditional logic.RowViewer trait in the API mixes many concerns in a 'garbage-bin' style API which attempts to do everything: presentation, copy/paste, insertion/deletion, filtering, hotkeys, events.
This leads to you having to implement or work-around features that you do not need/use/want. It also mixes presentation with business-logic. e.g. your cell rendering code is
defined in the same trait impl that also selection changes and data deletion. No clear separation between user interactions and rendering.egui_extras::Table, it suffers from all the same issues as egui_extra::TableIf there are any errors in the above table, please create an issue or PR.
2025/08/13 - Crate created!
If you'd like to contribute, please raise an issue or a PR on the github issue tracker, work-in-progress PRs are fine
to let us know you're working on something, and/or visit the discord server. See the section above.