1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Force checkbox table columns to narrow width

This commit is contained in:
Jeremy Stretch
2019-10-07 17:22:35 -04:00
parent c668b990e1
commit 4c677e7fe6
2 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,12 @@ class ToggleColumn(tables.CheckBoxColumn):
def __init__(self, *args, **kwargs):
default = kwargs.pop('default', '')
visible = kwargs.pop('visible', False)
if 'attrs' not in kwargs:
kwargs['attrs'] = {
'td': {
'class': 'min-width'
}
}
super().__init__(*args, default=default, visible=visible, **kwargs)
@property