Skip to content

v0.41.0

Choose a tag to compare

@pentiminax pentiminax released this 29 Apr 20:56

What's Changed

Added

  • Added automatic client-side data hydration for AbstractDataTable when no explicit data, ajax, API Platform, or server-side source is configured.
  • Added Actions::setColumnClassName() to customize the generated actions column CSS class.
  • Added AbstractDataTable::getConfiguredDataTable() to inspect table configuration without triggering rendering preparation or data hydration.

Changed

  • Renamed the Doctrine query customization hook from queryBuilderConfigurator() to customizeQueryBuilder().
  • configureQueryBuilder() is now an internal final hook that runs custom query customization before DataTables filters are applied.
  • Client-side hydration now fetches all remaining rows when request length <= 0.
  • ArrayDataProvider and DoctrineDataProvider now treat non-positive request lengths as “no limit”.
  • Explicit Action::setEntityClass() values are now preserved instead of being overwritten by #[AsDataTable].
  • Edit modal resolution now reads configured table metadata without preparing rendering or hydrating data.

Documentation

  • Updated AbstractDataTable and maker docs to use customizeQueryBuilder().
  • Documented getConfiguredDataTable().

Dependencies

  • Updated docs tooling dependencies, including ESLint, Astro compiler-related packages, TypeScript ESLint, Tailwind Prettier plugin, and Vite.
  • Updated jsdom to ^29.1.0.

Tests

  • Added coverage for client-side auto hydration.
  • Added coverage for non-positive request length handling.
  • Added coverage for configurable action column classes.
  • Added coverage for rendering preparation retry behavior.
  • Expanded Twig rendering tests for provider-hydrated tables.

Upgrade Notes

Query customization hook renamed

If your table overrides:

public function queryBuilderConfigurator(QueryBuilder $qb, DataTableRequest $request): QueryBuilder

rename it to:

protected function customizeQueryBuilder(QueryBuilder $qb, DataTableRequest $request): QueryBuilder

The old method is no longer called.

Client-side tables may now hydrate automatically

Client-side AbstractDataTable instances now fetch provider data during rendering when no explicit source is configured. If a table uses #[AsDataTable] without serverSide(), ajax(), data(), or API Platform wiring, rendering may now require an EntityManagerInterface.

Use one of these explicit modes when auto hydration is not desired:

$table->serverSide();
$table->ajax('/endpoint');
$table->data($rows);
$table->apiPlatform();

#[AsDataTable] edit modal options

editModalTemplate and editModalAdapter now default to empty strings instead of null. Passing null explicitly is no longer supported.

Full Changelog: v0.40.0...v0.41.0