Skip to main content

dash-react-table

Dash component for react-table

dash-react-table provides a lightweight table component built on top of react-table.

Note: This above link will take you to version 6 which is the one I used for this component (v6.8.6 to be exact)

Installation

dash-react-table is hosted on PyPI, and can be installed by running

pip install dash-react-table

Usage

import dash
import dash_html_components as html
import pandas as pd

from dash_react_table import DashReactTable

df = pd.read_csv(
    'https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')


data = df.to_json(orient='records')

columns = [{'Header': i, 'accessor': i} for i in df.columns]

app.layout = html.Div([
    DashReactTable(
        id='table',
        data=data,
        columns=columns
    )
])

if __name__ == '__main__':
    app.run_server(debug=True)
    

DashReactTable Properties

Attribute Description Type Default value
id Optional identifier used to reference component in callbacks string
data An array of data list of dict where each dict corresponds to a row of data
columns An array of column attributes list of dict which can contain the followings keys: Header(string), accessor(string), sortable(boolean), filterable(boolean), show(boolean), width(int), minWidth(int), maxWidth(int), className(string), style(string), headerClassName(string), headerStyle(string)
showPagination Turn on pagination boolean false
showPaginationTop Put pagination on top boolean false
showPaginationBottom Put pagination on top boolean true
showPageSizeOptions Provide options for pagination boolean true
pageSizeOptions Define the size options for pagination list of int [5, 10, 20, 25, 50, 100]
defaultPageSize Default page size int 20
minRows Controls the minimum number of rows to display int
sortable Allow columns to be sorted boolean true
resizable Allow columns to be resizable boolean true
filterable Allow columns to be filterable. The component has a custom filter which performs a case/order insensitive filter. boolean false
className Add classname to react-table. The main use case for this is to add "-striped" and/or "-highlight" string
style inline table styles dict
conditionalFormatting Custom conditional color formatting. Currently only supports d3.scaleThreshold. dict with contains the following keys: domain(list of int), range(list of dict styles), ignore(list of string)

Additonal notes:

  • All column properties can override table level properties

  • To use conditional formatting you must have N + 1 range values for N domain values. Range values must be camelcased styles.

  • To make a scrolling table with fixed headers, be sure to add a fixed height to the table's style property.

Metadata

Release files for dash-react-table 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dash-react-table 0.0.3
File Size Uploaded Provenance Actions
dash_react_table-0.0.3.tar.gz 788.8 kB Without provenance Details for dash_react_table-0.0.3.tar.gz

Release files / dash_react_table-0.0.3.tar.gz

Download URL dash_react_table-0.0.3.tar.gz
Size 788.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a443d1fd1281de8ac18ba5b07de6d1fb8ea461e7df60327e8461063729f4537c
BLAKE2b-256 checksum
How to use checksums
d800a705f42305a0ce58bcd0b33dab8f860c50a70e43576524741fa613416cdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4

Security for dash-react-table 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page