Skip to content

Dash Charlotte v0.3.1

Latest
Compare
Choose a tag to compare
@GusFurtado GusFurtado released this 02 Jul 01:33
· 25 commits to main since this release

Table Improvements

Changed

  • The id argument of TableColumn and its subclasses is now required.

Added

  • Every original argument of the Dash components can be passed through kwargs. See examples below;
  • New docstrings with examples to every table column subclass;
  • A loading wrapper for each cell. Turn them on with loading=True column argument;
  • __repr__ and __str__ methods to table columns.

Examples

>>> col = TableButtonCol(
...     id = ['id_1', 'id_2', 'id_n'],
...     header = 'Button Column,
...     text = 'Default Text',
...     icon = 'fas fa-exclamation-triangle',
...     header_style = {'background-color': 'cyan'},
...     button_size = 'sm',
...     cell_className = 'bg-shade1'
... )
>>> col = TableDropdownCol(
...     id = ['id_1', 'id_2', 'id_n'],
...     header = 'Button Column,
...     header_style = {'background-color': 'cyan'},
...     cell_className = 'bg-shade1',
...     dropdown_value = [True, False, True],
...     dropdown_options = [
...         {'label': 'Yes', 'value': True},
...         {'label': 'No', 'value': False}
...     ],
...     dropdown_clearable = False
... )
>>> col = TableDropdownCol(
...     id = ['id_1', 'id_2', 'id_n'],
...     header = 'Button Column,
...     header_style = {'background-color': 'cyan'},
...     text = [1111.11, 2222.22, 3333.33],
...     text_format = '{:.2%}'.format,
...     text_className = 'red',
...     cell_className = 'bg-shade1'
... )
>>> col = TableDropdownCol(
...     id = ['id_1', 'id_2', 'id_n'],
...     header = 'Button Column,
...     header_style = {'background-color': 'cyan'},
...     cell_className = 'bg-shade1',
...     input_type = 'number',
...     input_min = 0,
...     input_max = 9,
...     input_step = 1,
...     input_value = [2,3,4]
... )