mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
fix bug: when no source items found, the table should still show and it should works as adding new records
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48078 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a1792c0e89
commit
1896bff08c
@ -515,7 +515,7 @@ class TableField extends TableListField {
|
||||
|
||||
// TODO Implement custom requiredFields
|
||||
$items = $this->sourceItems();
|
||||
if($this->requiredFields&&$items->count()) {
|
||||
if($items&&$this->requiredFields&&$items->count()) {
|
||||
foreach ($this->requiredFields as $field) {
|
||||
/*if($fields->dataFieldByName($field)) {
|
||||
$js .= "\t\t\t\t\trequire('$field');\n";
|
||||
|
Loading…
Reference in New Issue
Block a user