NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3992 most downloaded on Packagist
DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc
Last release 6 months ago
17 Mar 2026
Release timing varies
gaps range from 2 weeks to 1.2 years
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
229 releases · first in 2016
Fixed inline editing with complex form validation
Fixed export functionality with large datasets
Nothing published for this version
One column per quarter.
Enhanced Date Filter Validation: Improved validation for date range filters with better error messages
Export Confirmation Dialogs: Added confirmation dialogs for export operations to improve user experience
Bootstrap 4 Initial Support: Added initial compatibility with Bootstrap 4 while maintaining Bootstrap 3 support
Symfony PropertyAccess v4 Support: Added compatibility with Symfony PropertyAccess component v4.x
Fixed sorting persistence across page reloads
Fixed inline editing validation scope
Fixed export functionality with custom column renderers
Fixed filter reset functionality in complex scenarios
Fixed aggregation functions with filtered data
Enhanced link creation with presenter link support: The TLink trait now automatically detects when a link contains a colon (:) and delegates link crea
TLink trait now automatically detects when a link contains a colon (:) and delegates link creation to the presenter's link() method, enabling support for absolute presenter links (e.g., Homepage:default, :Admin:User:list)Nette\InvalidArgumentException to provide more robust error handling during link generation, preventing unhandled exceptions from breaking the link creation processThe changes affect the createLink() method in src/Traits/TLink.php:
Before (v5.5.0):
protected function createLink(DataGrid $grid, $href, $params)
{
$targetComponent = $grid;
for ($iteration = 0; $iteration < 10; $iteration++) {
$targetComponent = $targetComponent->getParent();
try {
@$link = $targetComponent->link($href, $params);
} catch (InvalidLinkException $e) {
$link = false;
}
// ... rest of the method
}
}
After (v5.5.1):
protected function createLink(DataGrid $grid, $href, $params)
{
$targetComponent = $grid;
if (strpos($href, ':') !== false) {
return $grid->getPresenter()->link($href, $params);
}
for ($iteration = 0; $iteration < 10; $iteration++) {
$targetComponent = $targetComponent->getParent();
if ($targetComponent === null) {
$this->throwHierarchyLookupException($grid, $href, $params);
}
try {
@$link = $targetComponent->link($href, $params);
} catch (InvalidLinkException $e) {
$link = false;
} catch (Nette\InvalidArgumentException $e) {
$link = false;
}
// ... rest of the method
}
}
This release maintains backward compatibility while adding support for presenter-level links and improving the robustness of the link creation mechanism.
Custom Renderer Support for ColumnsSummary
Custom Renderer Support for ColumnsSummary (#575)
setRenderer() method available on ColumnsSummaryRender Condition Callback for Actions (#597)
setRenderCondition() method to actions allowing conditional renderingTRenderCondition trait provides reusable render condition functionalityCustom Button Renderer Trait
TButtonRenderer trait consolidates button rendering logicDataGridColumnRendererExceptionEnhanced Link Creation (#592)
DataGridLinkCreationException for better error reportingInline Edit Validation
JavaScript Enhancements
Default Sort Column Fix (#545)
getColumnDefaultSort() method to properly retrieve default sort settingsPHP Compatibility
TButtonRenderer compatibility with PHP versions < 7.1Ublaboo\DataGrid\Column\Action~1.0.0|~2.0.0)This release focuses on extensibility improvements, better conditional rendering support, and several important bug fixes that improve the overall stability and flexibility of the datagrid component.
Nothing published for this version
Nothing published for this version
Inline Editing: Fixed incorrect hiding of inline edit buttons when multiple datagrids are present on the same page
Inline Editing: Fixed incorrect hiding of inline edit buttons when multiple datagrids are present on the same page
Previously, when inline editing was triggered on one datagrid, the inline edit buttons would be hidden globally across all datagrids on the page. This fix ensures that inline edit button visibility is properly scoped to the specific datagrid instance where the inline editing action was performed.
Before:
// Affected all datagrids on the page
$('.datagrid-inline-edit-trigger').addClass('hidden');
After:
// Only affects the specific datagrid instance
grid = $('.datagrid-' + payload._datagrid_name);
grid.find('.datagrid-inline-edit-trigger').addClass('hidden');
This version removes the deprecated \Nette\Object inheritance pattern in favor of the modern Nette\SmartObject trait approach introduced in Nette 2.4+…
extends \Nette\Object inheritance from core classes\Nette\Object with Nette\SmartObject trait in FilterableDataSource and DateTimeHelper classesThis version removes the deprecated \Nette\Object inheritance pattern in favor of the modern Nette\SmartObject trait approach introduced in Nette 2.4+.
Classes affected:
Ublaboo\DataGrid\DataSource\FilterableDataSourceUblaboo\DataGrid\Utils\DateTimeHelperBefore (v5.4.9):
abstract class FilterableDataSource extends \Nette\Object
{
// class implementation
}
final class DateTimeHelper extends \Nette\Object
{
// class implementation
}
After (v5.4.10):
use Nette\SmartObject;
abstract class FilterableDataSource
{
use SmartObject;
// class implementation
}
final class DateTimeHelper
{
use SmartObject;
// class implementation
}
Impact:
SmartObject trait provides the same magic methods (__get, __set, __isset, __unset) as the deprecated \Nette\ObjectUpgrade Requirements:
FilterableDataSource or DateTimeHelper in your code, ensure your environment supports the SmartObject traitFixed DibiFluentDataSource LIKE query escaping issue to prevent SQL injection vulnerabilities
nette/utils from >=2.3.10 to >=2.4.0Nette\Object to Nette\SmartObject trait across entire codebase for Nette 2.4+ compatibility%~like~ placeholder instead of manual escapingNette\Object to use SmartObject trait instead:
FilterableColumn, Renderer, DataModel, Filter, GroupActionGroupActionCollection, InlineEdit, SimpleTranslator, RowOption, ArraysHelper, SortingEnhanced DateTimeHelper to support Unix timestamp format ('U') parsing
DateTimeHelper::fromString() methodDetails: The DateTimeHelper class now includes the 'U' format (Unix timestamp) in its array of supported date formats. This allows the datagrid to properly parse Unix timestamps when converting string values to DateTime objects, improving compatibility with timestamp-based data sources.
Technical Change:
// Added to the $formats array in DateTimeHelper::fromString()
'U', // Unix timestamp support
This enhancement maintains backward compatibility while extending the date parsing capabilities of the datagrid component.
PostgreSQL: Fixed non-functional text filter when using PostgreSQL with Dibi database layer
DibiFluentPostgreDataSource class to properly handle PostgreSQL-specific text filteringILIKE operator for case-insensitive matching in PostgreSQLDataModel to use PostgreSQL-specific data sourceDibiFluentPostgreDataSource class extending DibiFluentDataSourceDataModel::getDataSource() method to detect PostgreSQL driver and instantiate appropriate data sourceTechnical Details:
The fix addresses a compatibility issue where the generic DibiFluentDataSource was not properly handling PostgreSQL's case-insensitive text matching. The new DibiFluentPostgreDataSource class overrides the applyFilterText() method to:
ILIKE operator instead of LIKE for case-insensitive matchingescapeLike() methodThis change ensures that text filtering works consistently across all supported database drivers, including PostgreSQL, MySQL, and MS SQL Server.
ArrayDataSource: Fixed date conversion to string to use DateTimeInterface instead of DateTime for better compatibility with different date implementat
ArrayDataSource: Fixed date conversion to string to use DateTimeInterface instead of DateTime for better compatibility with different date implementations (#584)
// Before (only worked with DateTime objects)
if (is_object($item[$column]) && $item[$column] instanceof \DateTime) {
$sort_by = $item[$column]->format('Y-m-d H:i:s');
}
// After (works with all DateTimeInterface implementations)
if (is_object($item[$column]) && $item[$column] instanceof \DateTimeInterface) {
$sort_by = $item[$column]->format('Y-m-d H:i:s');
}
JavaScript: Fixed datagridGroupActionMultiSelect() function to work correctly when selectpicker plugin is not available (#561)
The DateTimeInterface change improves compatibility with immutable date objects (DateTimeImmutable) and other date implementations that implement the DateTimeInterface, making the datagrid more flexible when working with different date/time libraries.
The selectpicker fix resolves a JavaScript error that occurred when the Bootstrap selectpicker plugin was not included in the project but the datagrid attempted to use selectpicker-specific functionality for group action multi-select controls.
Added DataGrid::allowRowsMultiAction() method to conditionally show/hide MultiAction options based on row data
DataGrid::allowRowsMultiAction() method to conditionally show/hide MultiAction options based on row dataMultiAction::setRowCondition() and MultiAction::testRowCondition() methods for row-specific action filteringcolumn_multi_action.latte) with continueIf directiveColumnStatus::setReplacement() method to prevent misuseImpact: This is a non-breaking change that fixes PHP compatibility issues for users running PHP 5.6 or 7.0.
public visibility modifier from class constant in GroupActionCollection (#554)
public const ID_ATTRIBUTE_PREFIX = 'group_action_item_'; to const ID_ATTRIBUTE_PREFIX = 'group_action_item_';public const syntax was introduced in PHP 7.1, while this library supports PHP 5.6+The public visibility modifier on class constants was introduced in PHP 7.1. Since this library supports PHP 5.6 and 7.0, using public const would cause a fatal syntax error on older PHP versions. Class constants without an explicit visibility modifier are public by default, making this change functionally equivalent while maintaining backward compatibility.
Impact: This is a non-breaking change that fixes PHP compatibility issues for users running PHP 5.6 or 7.0.
This release contains no breaking changes or new functionality
package.json for front-end asset distribution.npmignore file to exclude PHP source and tests from NPM packageNULL with null, TRUE/FALSE with true/falseublaboo-datagridMigration Notes: No breaking changes. This is a pure bug fix that improves the accuracy of the group action checkbox counter without requiring any cod…
.datagrid-{grid} input[data-check] to input[data-check-all-{grid}] for more accurate checkbox selectionThe fix addresses a selector specificity issue in the JavaScript code that handles group action functionality. Previously, the selectors were too broad and could potentially count unrelated checkboxes, leading to inaccurate counters. The new selectors use more specific attribute-based targeting (data-check-all-{grid}) to ensure only the relevant checkboxes are counted.
Migration Notes: No breaking changes. This is a pure bug fix that improves the accuracy of the group action checkbox counter without requiring any code changes from users.
Fixed inline editing for select filters: Corrected JavaScript logic for inline editing of select-type filters where the wrong value was being used to
Fixed inline editing for select filters: Corrected JavaScript logic for inline editing of select-type filters where the wrong value was being used to set the selected option. Previously, the code incorrectly used $(this).val() instead of the actual valueToEdit when setting the selected option, which could cause incorrect option selection during inline editing.
Before:
return input.find('option[value=' + $(this).val() + ']').prop('selected', true);
After:
return input.find('option[value=' + valueToEdit + ']').prop('selected', true);
Enhanced FilterSelect fluent interface: The setPrompt() method in FilterSelect class now properly supports method chaining by returning $this, allowing for more readable and chainable filter configuration.
// Now supports fluent interface
$grid->addFilterSelect('status', 'Status', $options)
->setPrompt('Select status...')
->setTranslateOptions(false);
Inline Editing Enhancement: Added setEditableValueCallback() method to Column class, enabling different display content vs. edit values in inline edit
setEditableValueCallback() method to Column class, enabling different display content vs. edit values in inline editing$grid->addColumnText('name', 'Name')
->setEditable()
->setEditableValueCallback(function($row) {
// Return the raw value for editing, while displaying formatted content
return $row->getRawName();
});
FilterSelect::setPrompt() now returns $this for fluent interface support// Before: setPrompt() returned void
$filter->setPrompt('Select option...');
$filter->setDefaultValue('default');
// After: method chaining supported
$filter->setPrompt('Select option...')
->setDefaultValue('default');
_datagrid_editable_new_value payload response$editable_value_callback property and related methods (setEditableValueCallback(), getEditableValueCallback()) to Column classhandleInlineEdit() method to support returning new values from editable callbacksAdded ability to configure the number of columns in outer filters via setOuterFilterColumnsCount() method
setOuterFilterColumnsCount() method
InvalidArgumentException for invalid column countsgetOuterFilterColumnsCount() getter methodFixed InlineAdd cancel button behavior to only trigger on left mouse button click and changed from mousedown to mouseup event (closes #445)
Browser Compatibility: Fixed missing event.path property in Firefox browsers by implementing a cross-browser compatible DOM path traversal function
event.path property in Firefox browsers by implementing a cross-browser compatible DOM path traversal function (#497)Prior to this release, the datagrid's shift-click selection functionality relied on the event.path property, which is not available in Firefox browsers. This caused JavaScript errors and prevented proper checkbox group selection when using Shift+Click.
Before (not working in Firefox):
for (el in e.path) {
if ($(el).is('.col-checkbox') && last_checkbox && e.shiftKey) {
// Selection logic...
}
}
After (cross-browser compatible):
getEventDomPath = function(e) {
if (path in e) {
return e.path;
}
path = [];
node = e.target;
while (node !== document.body) {
path.push(node);
node = node.parentNode;
}
return path;
}
for (el in getEventDomPath(e)) {
if ($(el).is('.col-checkbox') && last_checkbox && e.shiftKey) {
// Selection logic...
}
}
When using filters with autosubmit set to false and outerFilterRendering set to true, the submit button was not properly displayed within the collapsible filter container.
JavaScript compatibility: Replaced deprecated jQuery .size() method with .length for better compatibility with newer jQuery versions.
setShowSelectedRowsCount(false). (#5812557)setPrompt() and getPrompt() methods to FilterSelect class, allowing dynamic control over select filter prompts. Prompt can now be reset using setPrompt(null). (#521)COUNT() operations on grouped queries by using DISTINCT counting. (#532).size() method with .length for better compatibility with newer jQuery versions.Migration Notes: This release is backward compatible. The selected rows counter is enabled by default but can be disabled if needed. All new FilterSelect prompt methods maintain existing behavior when not explicitly used.
This is a non-breaking change that maintains full backward compatibility while enabling new extensibility scenarios.
final keyword from FunctionSum class to allow inheritance and customizationprivate to protected for $column, $result, $dataType, and $renderer propertiesThe FunctionSum aggregation class has been made extensible by removing the final modifier and changing private properties to protected visibility. This allows developers to create custom sum aggregation classes that inherit from FunctionSum.
Before (v5.2.3):
final class FunctionSum implements IAggregationFunction
{
private $column;
private $result = 0;
private $dataType;
private $renderer;
// ...
}
After (v5.2.4):
class FunctionSum implements IAggregationFunction
{
protected $column;
protected $result = 0;
protected $dataType;
protected $renderer;
// ...
}
This is a non-breaking change that maintains full backward compatibility while enabling new extensibility scenarios.
Fixed AJAX response handling in datagrid template by properly separating tbody block definition
n:block="tbody" attribute to separate {block tbody} declaration in datagrid.latte templateThe fix addresses an issue where the Latte template's tbody block was incorrectly structured, causing problems with AJAX snippet updates. The change separates the block definition from the HTML element attributes, ensuring proper template inheritance and AJAX functionality.
Aggregation Functions: Added custom renderer support to FunctionSum aggregation function `php $aggregationFunction->setRenderer(function ($result) { r
FunctionSum aggregation function$aggregationFunction->setRenderer(function ($result) {
return number_format($result, 2) . ' CZK';
});
IAggregatable interface for improved aggregation support across different data source typesFunctionSum to work with Doctrine Collections using PropertyAccessHelpergetTemplate() calls in DataGrid rendering by caching template instanceFunctionSum class final and improved encapsulation by changing protected properties to privatePropertyAccessHelper::getValue() methodDoctrine\Collection dataSource aggregation functionfilterRow() methodredrawControl('summary') callsIDataSource typehint from aggregation functionsIAggregationFunction interfaceDibiFluentDataSource, DoctrineDataSource, and DoctrineCollectionDataSource now implement IAggregatableThis release focuses on enhancing the aggregation functionality and improving template rendering performance while maintaining full backward compatibility.
Fixed checkbox column visibility for group actions - column with checkboxes is now always shown when group actions are defined, even when no rows have
row parameter in templates (#518)hasGroupActions template variable to avoid repeated method callsthead-group-action AJAX snippet for better partial updates of group action headertbody block to table template for improved customization capabilitieshasGroupActionOnRows usage refined for better logic separationthead-group-action)Aggregation support for Doctrine data source: Added support for sum aggregation functions when using Doctrine QueryBuilder as data source
FunctionSum constructor now accepts an optional $dataType parameter to specify whether to use paginated, filtered, or all data for calculationsFunctionSum now supports Doctrine QueryBuilder in addition to existing data sources
$dataType parameter with default value IAggregationFunction::DATA_TYPE_PAGINATED// Before
public function __construct($column)
// After
public function __construct($column, $dataType = IAggregationFunction::DATA_TYPE_PAGINATED)
getCount() and getData() methods to use Paginator only when query complexity requires itprocessAggregation() method to DoctrineDataSource for handling aggregation callbacksusePaginator() private method to determine when Paginator is necessaryFunctionSum usage will continue to work without modificationThis release focuses on performance improvements for Doctrine-based data sources and extends aggregation functionality to support more complex use cases while maintaining full backward compatibility.
Fixed per-page submit functionality: Improved autosubmit behavior for pagination controls to support both input[type=submit] and button[type=submit] e
input[type=submit] and button[type=submit] elements (#486)add() method to direct property assignment in template rendering (#483)?) to named parameters (:param) in DoctrineDataSource for better query readability and maintainability (#447)// Before
$this->data_source->andWhere("$c = ?$p")->setParameter($p, $value);
// After
$this->data_source->andWhere("$c = :$p")->setParameter($p, $value);
DateTimeImmutable objects in DateTimeHelper::fromString() method, allowing seamless conversion between DateTimeImmutable and DateTime instances (#488)DateTimeImmutable objects in date filtering and processing, maintaining timezone information during conversionFixed Dibi 2.x compatibility (#479, #480)
Dibi\Helpers::escape() method which was removed in Dibi 2.xDibiFluentDataSource and DibiFluentMssqlDataSource to handle API changes gracefullyDibiFluent class alongside Dibi\Fluentublaboo/controls from composer.json to reduce package footprintThe main compatibility issue addressed the removal of Dibi\Helpers::escape() in Dibi 2.x. The fix implements a fallback mechanism:
// Before (only worked with Dibi 3.x+)
$column = Dibi\Helpers::escape($driver, $column, \dibi::IDENTIFIER);
// After (works with both Dibi 2.x and 3.x+)
if (class_exists(Dibi\Helpers::class) === TRUE) {
$column = Dibi\Helpers::escape($driver, $column, \dibi::IDENTIFIER);
} else {
$column = $driver->escape($column, \dibi::IDENTIFIER);
}
This release ensures continued compatibility with projects using Dibi 2.x while maintaining support for newer versions.
Added onFiltersAssembled event as replacement for deprecated onFiltersAssabled
onFiltersAssembled event as replacement for deprecated onFiltersAssabledsetMultiSortEnabled(), removeColumn(), removeAction(), removeFilter(), setStrictSessionFilterValues(), and removeToolbarButton() now return $thisgetToolbarButton() method to retrieve existing toolbar buttons by keyremoveToolbarButton() method to remove toolbar buttonsaddToolbarButton() now throws DataGridException if button with same key already existsgetSortableParentPath() now uses Nette\Application\IPresenter instead of Nette\Application\UI\Control$onFiltersAssabled property in favor of $onFiltersAssembled (typo fix)assableFilters() method in favor of assembleFilters() (typo fix)assableFilters() → assembleFilters()$onFiltersAssabled → $onFiltersAssembledUpdated class references from deprecated DibiOdbcDriver/DibiMsSqlDriver to new namespaced versions
Group Multi-Select Actions: Added support for multi-select dropdown in group actions
GroupMultiSelectAction class for creating multi-select group actionsDataGrid::addGroupMultiSelectAction($title, $options) methodAction Link Behavior: Added ability to open action links in new tabs/windows
Action::setOpenInNewTab($open_in_new_tab = TRUE) methodAction::isOpenInNewTab() method to check current settingtarget="_blank" attribute when enabledEnhanced Database Driver Support: Extended Dibi driver compatibility
Dibi\Drivers\SqlsrvDriver with MSSQL data sourceDibiOdbcDriver/DibiMsSqlDriver to new namespaced versionsInline Edit Method Chaining: Enhanced fluent interface support
InlineEdit::setItemId($id) now returns $this for method chainingInlineEdit::setShowNonEditingColumns($show) now returns $this for method chainingInline Edit Error Handling: Fixed frontend behavior when inline edit operations fail
Group Action Styling: Enhanced multi-select group action rendering
New Classes:
Ublaboo\DataGrid\GroupAction\GroupMultiSelectAction - Extends GroupSelectAction with multi-select functionalityEnhanced Methods:
// New action methods
$action->setOpenInNewTab(true); // Open link in new tab
$grid->addGroupMultiSelectAction('Bulk Status', $statusOptions);
// Enhanced method chaining
$inlineEdit->setItemId($id)->setShowNonEditingColumns(false);
Database Compatibility:
This release focuses on extending group action capabilities with multi-select functionality, improving action link behavior, and enhancing database driver compatibility while maintaining backward compatibility.
Fixed broken method chaining in Filter classes by adding missing return $this statements
return $this statements
Filter::setValue() now returns static for method chainingFilter::setCondition() now returns static for method chainingFilterDate::setFormat() now returns static for method chainingFilterDateRange::setFormat() now returns static for method chainingdatagrid-{$control->getName()}-row-filters@return static annotations for fluent interface methodsAdded configurable attributes parameter to setEditableInputTypeSelect() method for enhanced customization
setEditableInputTypeSelect() method for enhanced customizationThe setEditableInputTypeSelect() method now accepts an optional $attrs parameter:
Before:
public function setEditableInputTypeSelect(array $options = [])
After:
public function setEditableInputTypeSelect(array $options = [], array $attrs = [])
This change allows developers to pass additional HTML attributes to select elements used in inline editing, providing greater customization flexibility.
Previously, when using select dropdowns in inline editing mode, after successful form submission the cell would display the selected value instead of the human-readable display text. This has been corrected so that:
JavaScript Fix:
// Before
cell.html(value);
// After
if (cell.data('datagrid-editable-type') === 'select') {
cell.html(input.find('option[value=' + value + ']').html());
} else {
cell.html(value);
}
This ensures a better user experience by showing meaningful text rather than internal values in the datagrid interface.
…control over column header translation. The breaking changes primarily affect internal APIs and should have minimal impact on standard usage patterns.
setTranslatableHeader() and isTranslatableHeader() methods in Column class to control column header translation$elementCache propertysetAttribute() method in Filter class for setting single attributesgetElementPrototype() method in Column class - now returns cached element without parametersgetElementPrototype($tag, $key, $row) renamed to getElementForRender($tag, $key, $row)Column Element Prototype Changes:
// Before v5.0.5 - single method handled both cases
public function getElementPrototype($tag, $key = NULL, Row $row = NULL)
// After v5.0.5 - split into two methods
public function getElementPrototype($tag) // Returns cached element
public function getElementForRender($tag, $key, Row $row = NULL) // For template rendering
Filter Attributes Structure:
// Before v5.0.5
protected $attributes = [
['class', 'form-control input-sm']
];
// After v5.0.5
protected $attributes = [
'class' => ['form-control', 'input-sm'],
];
Column Translation Control:
// New functionality to disable translation on specific columns
$column->setTranslatableHeader(false);
This release focuses on performance improvements through element caching, better attribute handling in filters, and enhanced control over column header translation. The breaking changes primarily affect internal APIs and should have minimal impact on standard usage patterns.
Added Shift+click group selection functionality for checkbox columns - users can now select multiple rows by holding Shift and clicking checkboxes to
getActiveRowProperty() method from main getValue() method for better code organization and maintainability:table.column:throughColumn and table.column:throughColumnBreaking Changes: None
New Features:
:tableName.columnName:throughColumntableName.columnName:throughColumnCode Examples:
// Before v5.0.4 - limited relationship syntax
$grid->addColumnText('related', ':users.name');
// After v5.0.4 - with throughColumn support
$grid->addColumnText('related', ':users.name:user_id');
$grid->addColumnText('referenced', 'categories.name:category_id');
Migration Notes: This release is fully backward compatible. Existing column syntax continues to work unchanged, while new throughColumn syntax is optional and provides additional flexibility for complex relationships.
The refactored code improves maintainability by separating ActiveRow-specific logic into its own method while maintaining the same public API.
Fixed MultiAction column icon spacing calculation by using correct name parameter in tryAddIcon() method
tryAddIcon() method
$this->tryAddIcon($button, $this->getIcon(), $this->getText())$this->tryAddIcon($button, $this->getIcon(), $this->getName())Technical Details:
The MultiAction::renderButton() method was incorrectly passing $this->getText() to the tryAddIcon() helper method instead of $this->getName(). The tryAddIcon() method uses the third parameter to determine whether to add spacing ( ) after the icon based on the string length. This fix ensures the spacing calculation uses the column's actual name rather than its display text, which could be empty or have different length characteristics.
Template Translation System: Replaced deprecated {_'key'} translation syntax with modern {='key'|translate} filter syntax across all templates
setIconSecondary() and getIconSecondary() methods in Option class.datagrid-column-status-option-icon class{_'key'} translation syntax with modern {='key'|translate} filter syntax across all templates
data_grid_paginator.latte)datagrid.latte)datagrid_tree.latte)column_status.latte)DibiFluentDataSource text search functionality
utf8_bin and utf8_general_ci collation forcing.idea directory to .gitignore for improved developer experience with PhpStorm/IntelliJ IDEsTechnical Details:
The major improvements in this release focus on template system modernization and database performance optimization. The transition from the deprecated {_'key'} syntax to the {='key'|translate} filter provides better compatibility with newer Latte template versions and improves translation handling consistency.
The database search fix addresses potential performance issues in the DibiFluentDataSource where forced collation handling was causing unnecessary complexity and potential encoding problems. By removing the collation forcing logic, search queries will now use the database's default collation settings, which is typically more efficient and appropriate for most use cases.
The addition of secondary icon support for status columns provides enhanced UI flexibility for displaying additional visual indicators alongside status options.
Filter Reset: Fixed JavaScript functionality for resetting individual column filters. The filter reset now correctly uses the dynamic datagrid name in
examplesGrid prefix, ensuring proper functionality across different datagrid instances.ColumnLink::setOpenInNewTab() method to return $this, making it consistent with the fluent interface pattern used throughout the library.DataGrid::createSorting() method from @return void to @return Sorting.coverage.xml file from version control and updated .gitignore to exclude coverage files and follow PHP best practices for dependency management.Technical Details:
The main bug fix addressed an issue in the JavaScript assets where the filter reset functionality was using a hardcoded grid name (examplesGrid) instead of the dynamic grid name from the payload. This caused the reset filter by column feature to fail when the datagrid had a different name.
Before:
new_href = href.replace('do=examplesGrid-resetFilter', 'do=' + payload._datagrid_name + '-resetColumnFilter')
After:
new_href = href.replace('do=' + payload._datagrid_name + '-resetFilter', 'do=' + payload._datagrid_name + '-resetColumnFilter')
The ColumnLink::setOpenInNewTab() method was enhanced to maintain consistency with the library's fluent interface pattern:
public function setOpenInNewTab($open_in_new_tab = TRUE)
{
$this->open_in_new_tab = $open_in_new_tab;
return $this; // Added for fluent interface
}
…experience, and better code organization. The breaking changes are primarily related to internal API improvements and should have minimal impact on ty…
PHP Version Requirements
Trait Refactoring
TButton trait - Replaced with multiple specialized traits:
TButtonCaret - For dropdown caret functionalityTButtonClass - For CSS class managementTButtonIcon - For icon handlingTButtonText - For button textTButtonTitle - For button title attributesTButtonTryAddIcon - For conditional icon additionMethod Signature Changes
setDefaultSort() method signature changed - Added optional $use_on_reset parameter:// Before
public function setDefaultSort($sort)
// After
public function setDefaultSort($sort, $use_on_reset = TRUE)
Exception Classes
DataGridColumnNotFoundException - Thrown instead of generic DataGridException for missing columnsDataGridFilterNotFoundException - Thrown instead of generic DataGridException for missing filtersMethod Name Corrections
deleteSesssionData() renamed to deleteSessionData()Aggregation Functions
IAggregationFunction interface for custom aggregation logicIMultipleAggregationFunction interface for complex aggregationsFunctionSum implementation for sum calculationsTDataGridAggregationFunction trait added to main DataGrid classMultiAction Column
$grid->addMultiAction('actions', 'Actions')
->addAction('edit', 'Edit', 'edit')
->addAction('delete', 'Delete', 'delete');
setRowCondition()Multi-Sort Capability
$multiSort property and related functionality_grid_has_sortedRelated Column Names Support
Enhanced Filter Features
IFilterDate interface for date filter implementationsRow Conditions for Item Detail
Session Management
_grid_has_sorted for sorting state trackingForm Handling
UI/UX Enhancements
<i> elementsCode Quality
boolean to boolJavaScript/CSS
dibi/dibi: ^3.0 added to optional dependenciesFor users extending button functionality:
Replace usage of the removed TButton trait with specific button traits:
// Before
use Ublaboo\DataGrid\Traits\TButton;
class CustomAction {
use TButton;
}
// After
use Contributte\Datagrid\Traits\TButtonIcon;
use Contributte\Datagrid\Traits\TButtonClass;
use Contributte\Datagrid\Traits\TButtonText;
use Contributte\Datagrid\Traits\TButtonTitle;
class CustomAction {
use TButtonIcon, TButtonClass, TButtonText, TButtonTitle;
}
For custom exception handling: Update catch blocks to use specific exception types:
// Before
try {
$column = $grid->getColumn($key);
} catch (DataGridException $e) {
// handle error
}
// After
try {
$column = $grid->getColumn($key);
} catch (DataGridColumnNotFoundException $e) {
// handle missing column
}
For PHP 5.5 users: Upgrade to PHP 5.6 or higher before updating to this version.
This release represents a significant evolution of the DataGrid component with enhanced functionality for complex data operations, improved user experience, and better code organization. The breaking changes are primarily related to internal API improvements and should have minimal impact on typical usage patterns.
For detailed upgrade instructions between major versions, see UPGRADE.md.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →