Dash Leader Checkbox is a Plotly Dash component library that adds a single component: a checkbox that can control the value of other checkboxes. It essentially implements a constraint where the leader's value always implies the value of followers. Those followers are specified as a list of IDs.
- Install npm packages:
$ npm install - Create a Python virtual environment (using its own
virtualenvor a package manager) and activate. - Install python packages required to build components:
$ pip install -r requirements.txt - Install the python packages for testing (optional):
$ pip install -r tests/requirements.txt
The component itself is in src/lib/components/LeaderCheckbox.react.js with a simple usage example in usage.py.
To test the code in a Python environment:
- Build the code:
$ npm run build - Run the
usage.pyDash app:$ python usage.py
(Tests are currently not implemented.)
- Build the code:
$ npm run build - Create a Python distribution:
This will create source and wheel distribution in the generated the
$ python setup.py sdist bdist_wheeldist/folder. See PyPA for more information. - Copy the targball into a new environment and install it locally:
$ pip install dash_leader_checkbox-0.0.1.tar.gz
These three steps can also be run together using rebuild_and_install.sh.
(The component is currently not being distributed on PyPI and NPM.)