Add support for "row status" in Buefy grid tables
This commit is contained in:
parent
24547b4fc5
commit
05b8ed7153
4 changed files with 30 additions and 1 deletions
|
@ -1027,6 +1027,7 @@ class Grid(object):
|
|||
# filter / sort / paginate to get "visible" data
|
||||
raw_data = self.make_visible_data()
|
||||
data = []
|
||||
status_map = {}
|
||||
|
||||
# iterate over data rows
|
||||
for i in range(len(raw_data)):
|
||||
|
@ -1049,10 +1050,15 @@ class Grid(object):
|
|||
# set action URL(s) for row, as needed
|
||||
self.set_action_urls(row, rowobj, i)
|
||||
|
||||
status = self.extra_row_class(rowobj, i)
|
||||
if status:
|
||||
status_map[i] = status
|
||||
|
||||
data.append(row)
|
||||
|
||||
results = {
|
||||
'data': data,
|
||||
'row_status_map': status_map,
|
||||
}
|
||||
|
||||
if self.pageable and self.pager is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue