Middlewares act as a layer of transformation between the adapter and the final table output. Since adapters only extract structured data without modifications, middleware allows developers to:
- Modify Table Content – Add, remove, or update rows and columns dynamically.
- Apply Business Logic – Format dates, append computed values, or filter unwanted data.
- Customize Presentation – Change styles, add classes, or format text based on conditions.
Middleware operates after the adapter has structured the data but before rendering the table. This makes it useful for applying custom rules without modifying the original data source.