give empty records a corresponding flag on display as basis for better UI information
This commit is contained in:
parent
a1e2d52967
commit
cad5ba5ca3
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ class GridFieldInstance(ListFieldInstance):
|
||||||
for item in range(len(value), self.context.cardinality):
|
for item in range(len(value), self.context.cardinality):
|
||||||
rows.append([fi.display(fi.default)
|
rows.append([fi.display(fi.default)
|
||||||
for fi in self.columnFieldInstances])
|
for fi in self.columnFieldInstances])
|
||||||
return dict(headers=headers, rows=rows)
|
empty = not rows or (len(rows) == 1 and not [v for v in rows[0] if v])
|
||||||
|
return dict(headers=headers, rows=rows, empty=empty)
|
||||||
|
|
||||||
def unmarshall(self, value):
|
def unmarshall(self, value):
|
||||||
value = toUnicode(value.strip())
|
value = toUnicode(value.strip())
|
||||||
|
|
Loading…
Add table
Reference in a new issue