Fix collapse, group skew, empty tables and the tab strip scrollbar
This commit is contained in:
@@ -246,11 +246,17 @@ export function rowAction(panel, item) {
|
||||
}
|
||||
}
|
||||
|
||||
// A panel declaring `empty` is asking to stay visible with nothing in it and
|
||||
// say so - "No installed software reported." is an answer, where an absent
|
||||
// card is a question. `list` honoured that and `table` did not, for no reason
|
||||
// anybody wrote down, so a table panel with an empty message still vanished.
|
||||
// It matters more now that a panel can be the only thing in a tab: the tab
|
||||
// itself disappears with it.
|
||||
export function panelVisible(panel) {
|
||||
if (panel.render === 'tabs') return tabSections(panel).length > 0
|
||||
if (panel.render === 'list') return rows(panel).length > 0 || !!panel.empty
|
||||
if (panel.render === 'keyvalue') return keyvalueFields(panel).length > 0
|
||||
if (panel.render === 'table') return rows(panel).length > 0
|
||||
if (panel.render === 'table') return rows(panel).length > 0 || !!panel.empty
|
||||
if (panel.render === 'badge') return badges(panel).length > 0
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user