Allow to pass 0 as column value in List widgets

**Problem**: When overriden the columns value, if we pass 0 or '0', the condition is not met and therefore the column has a null value.

**Solution**: Check for not null in the condtion
This commit is contained in:
Ariel Ponce 2015-03-06 11:51:05 +01:00
parent c7fadd3a17
commit 2cffe106b8
1 changed files with 2 additions and 2 deletions

View File

@ -763,11 +763,11 @@ class Lists extends WidgetBase
/*
* Extensibility
*/
if ($response = Event::fire('backend.list.overrideColumnValue', [$this, $record, $column, $value], true)) {
if (!is_null($response = Event::fire('backend.list.overrideColumnValue', [$this, $record, $column, $value], true))) {
$value = $response;
}
if ($response = $this->fireEvent('list.overrideColumnValue', [$record, $column, $value], true)) {
if (!is_null($response = $this->fireEvent('list.overrideColumnValue', [$record, $column, $value], true))) {
$value = $response;
}