Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit ca1fc91

Browse files
Change component name to DataTable (#187)
1 parent 7383df4 commit ca1fc91

29 files changed

+118
-114
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -439,3 +439,7 @@ Derived properties allow the component to expose complex state that can be usefu
439439
## RC17- Linux install
440440

441441
Issue: https://github.com/plotly/dash-table/issues/137
442+
443+
## RC18 - Rename table component
444+
445+
Issue: https://github.com/plotly/dash-table/issues/154

dash_table/bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_table/demo.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_table/metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"src/dash-table/Table.js": {
2+
"src/dash-table/DataTable.js": {
33
"description": "",
4-
"displayName": "Table",
4+
"displayName": "DataTable",
55
"methods": [],
66
"props": {
77
"active_cell": {

dash_table/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-table",
3-
"version": "3.1.0-rc17",
3+
"version": "3.1.0-rc18",
44
"description": "Dash table",
55
"main": "build/index.js",
66
"scripts": {
@@ -22,7 +22,7 @@
2222
"build:js-dev": "run-s \"private::build -- --mode development\"",
2323
"build:js-test": "run-s \"private::build -- --config webpack.test.config.js\"",
2424
"build:js-test-watch": "run-s \"private::build -- --config webpack.test.config.js --watch\"",
25-
"build:py": "./extract-meta src/dash-table/Table.js > dash_table/metadata.json && cp package.json dash_table",
25+
"build:py": "./extract-meta src/dash-table/DataTable.js > dash_table/metadata.json && cp package.json dash_table",
2626
"lint": "run-s private::lint.js private::lint.ts",
2727
"test": "run-p --race private::host* private::runtests",
2828
"test.visual": "build-storybook && percy-storybook",

demo/App.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint no-magic-numbers: 0 */
22
import * as R from 'ramda';
33
import React, {Component} from 'react';
4-
import { Table } from 'dash-table';
4+
import { DataTable } from 'dash-table';
55
import {mockData} from './data';
66
import { memoizeOne } from 'core/memoizer';
77
import Logger from 'core/Logger';
@@ -70,7 +70,7 @@ class App extends Component {
7070
}
7171

7272
render() {
73-
return (<Table
73+
return (<DataTable
7474
setProps={this.setProps}
7575
{...this.state.tableProps}
7676
{...{ filtering: 'fe' }}

index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
children=[
3333
dcc.Location(id="location"),
3434
html.Div(id="container"),
35-
html.Div(style={"display": "none"}, children=dash_table.Table(id="hidden")),
35+
html.Div(style={"display": "none"}, children=dash_table.DataTable(id="hidden")),
3636
]
3737
)
3838

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-table",
3-
"version": "3.1.0-rc17",
3+
"version": "3.1.0-rc18",
44
"description": "Dash table",
55
"main": "build/index.js",
66
"scripts": {
@@ -22,7 +22,7 @@
2222
"build:js-dev": "run-s \"private::build -- --mode development\"",
2323
"build:js-test": "run-s \"private::build -- --config webpack.test.config.js\"",
2424
"build:js-test-watch": "run-s \"private::build -- --config webpack.test.config.js --watch\"",
25-
"build:py": "./extract-meta src/dash-table/Table.js > dash_table/metadata.json && cp package.json dash_table",
25+
"build:py": "./extract-meta src/dash-table/DataTable.js > dash_table/metadata.json && cp package.json dash_table",
2626
"lint": "run-s private::lint.js private::lint.ts",
2727
"test": "run-p --race private::host* private::runtests",
2828
"test.visual": "build-storybook && percy-storybook",

src/dash-table/Table.js renamed to src/dash-table/DataTable.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function isBackEnd(value) {
1616
return ['be', false].indexOf(value) !== -1;
1717
}
1818

19-
export default class Table extends Component {
19+
export default class DataTable extends Component {
2020
constructor(props) {
2121
super(props);
2222

@@ -726,5 +726,5 @@ export const propTypes = {
726726
dropdown_properties: PropTypes.any,
727727
};
728728

729-
Table.defaultProps = defaultProps;
730-
Table.propTypes = propTypes;
729+
DataTable.defaultProps = defaultProps;
730+
DataTable.propTypes = propTypes;

src/dash-table/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Environment from 'core/environment';
22
import Logger from 'core/Logger';
33

4-
import Table from 'dash-table/Table';
4+
import DataTable from 'dash-table/DataTable';
55

66
Logger.setDebugLevel(Environment.debugLevel);
77
Logger.setLogLevel(Environment.logLevel);
88

99
export {
10-
Table
10+
DataTable
1111
};

tests/cypress/dash/v_be_page.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
app.layout = html.Div(
2626
[
2727
html.Div(id="container", children="Hello World"),
28-
dash_table.Table(
28+
dash_table.DataTable(
2929
id="table",
3030
data=[],
3131
pagination_mode="be",

tests/cypress/dash/v_copy_paste.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
app.layout = html.Div(
2727
[
2828
html.Div(id="container", children="Hello World"),
29-
dash_table.Table(
29+
dash_table.DataTable(
3030
id="table",
3131
data=df[0:250],
3232
navigation="page",

tests/dash/app_dataframe_backend_paging.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def layout():
3535

3636
section_title('Backend Paging'),
3737

38-
dash_table.Table(
38+
dash_table.DataTable(
3939
id=IDS["table"],
4040
columns=[
4141
{"name": i, "id": i, "deletable": True} for i in sorted(df.columns)
@@ -65,7 +65,7 @@ def layout():
6565

6666
section_title('Backend Paging with Sorting'),
6767

68-
dash_table.Table(
68+
dash_table.DataTable(
6969
id=IDS["table-sorting"],
7070
columns=[
7171
{"name": i, "id": i, "deletable": True} for i in sorted(df.columns)
@@ -93,7 +93,7 @@ def layout():
9393
In this example, try sorting by continent and then any other column.
9494
''')),
9595

96-
dash_table.Table(
96+
dash_table.DataTable(
9797
id=IDS["table-multi-sorting"],
9898
columns=[
9999
{"name": i, "id": i, "deletable": True} for i in sorted(df.columns)
@@ -132,7 +132,7 @@ def layout():
132132
133133
''')),
134134

135-
dash_table.Table(
135+
dash_table.DataTable(
136136
id=IDS["table-filtering"],
137137
columns=[
138138
{"name": i, "id": i, "deletable": True} for i in sorted(df.columns)
@@ -150,7 +150,7 @@ def layout():
150150

151151
section_title('Backend Paging with Filtering and Multi-Column Sorting'),
152152

153-
dash_table.Table(
153+
dash_table.DataTable(
154154
id=IDS["table-sorting-filtering"],
155155
columns=[
156156
{"name": i, "id": i, "deletable": True} for i in sorted(df.columns)
@@ -181,7 +181,7 @@ def layout():
181181
className="row",
182182
children=[
183183
html.Div(
184-
dash_table.Table(
184+
dash_table.DataTable(
185185
id=IDS["table-paging-with-graph"],
186186
columns=[
187187
{"name": i, "id": i, "deletable": True} for i in sorted(df.columns)

tests/dash/app_dataframe_updating_graph_fe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def layout():
1717
return html.Div(
1818
[
1919
html.Div(
20-
dash_table.Table(
20+
dash_table.DataTable(
2121
id=IDS["table"],
2222
columns=[
2323
{"name": i, "id": i, "deletable": True} for i in df.columns

tests/dash/app_dropdown.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def layout():
5151

5252
section_title('Dash Table with Per-Column Dropdowns'),
5353

54-
dash_table.Table(
54+
dash_table.DataTable(
5555
id=IDS['dropdown'],
5656
data=df.to_dict('rows'),
5757
columns=[
@@ -81,7 +81,7 @@ def layout():
8181

8282
section_title('Dash Table with Per-Cell Dropdowns via Filtering UI'),
8383

84-
dash_table.Table(
84+
dash_table.DataTable(
8585
id=IDS['dropdown-by-cell'],
8686
data=df_per_row_dropdown.to_dict('rows'),
8787
columns=[
@@ -140,7 +140,7 @@ def layout():
140140

141141
html.Div('This example uses a deprecated API, `dropdown_properties`.'),
142142

143-
dash_table.Table(
143+
dash_table.DataTable(
144144
id=IDS['dropdown-by-cell'],
145145
data=df_per_row_dropdown.to_dict('rows'),
146146
columns=[

tests/dash/app_editor_with_configurable_options.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def update_table(*args):
111111
rows = df.to_dict("rows")
112112
else:
113113
rows = df_small.to_dict("rows")
114-
return dash_table.Table(
114+
return dash_table.DataTable(
115115
id=__name__,
116116
columns=[{"name": i, "id": i} for i in df.columns],
117117
data=rows,
@@ -126,7 +126,7 @@ def update_table(*args):
126126
)
127127

128128

129-
AVAILABLE_PROPERTIES = dash_table.Table(id="req").available_properties
129+
AVAILABLE_PROPERTIES = dash_table.DataTable(id="req").available_properties
130130

131131

132132
@app.callback(

tests/dash/app_multi_header.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
def layout():
66
df = pd.read_csv("datasets/gapminder.csv")
7-
return dash_table.Table(
7+
return dash_table.DataTable(
88
id=__name__,
99
columns=[
1010
{"name": ["Year", ""], "id": "year"},

tests/dash/app_simple.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
def layout():
66
df = pd.read_csv("./datasets/gapminder.csv")
7-
return dash_table.Table(
7+
return dash_table.DataTable(
88
id=__name__,
99
columns=[{"name": i, "id": i} for i in df.columns],
1010
data=df.to_dict("rows"),

tests/dash/app_sizing.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def layout():
272272
html.H3("Dash Interactive Table"),
273273
html.Div("These same styles can be applied to the dash table"),
274274
section_title("Dash Table - Default Styles"),
275-
dash_table.Table(
275+
dash_table.DataTable(
276276
id="sizing-1",
277277
data=df.to_dict("rows"),
278278
columns=[{"name": i, "id": i} for i in df.columns],
@@ -290,7 +290,7 @@ def layout():
290290
allocates space.
291291
"""
292292
),
293-
dash_table.Table(
293+
dash_table.DataTable(
294294
id="sizing-2",
295295
data=df.to_dict("rows"),
296296
content_style="grow",
@@ -317,7 +317,7 @@ def layout():
317317
allocates space.
318318
"""
319319
),
320-
dash_table.Table(
320+
dash_table.DataTable(
321321
id="sizing-3",
322322
data=df.to_dict("rows"),
323323
content_style="grow",
@@ -342,7 +342,7 @@ def layout():
342342
The columns have a width/minWidth/maxWidth of 100px.
343343
"""
344344
),
345-
dash_table.Table(
345+
dash_table.DataTable(
346346
id="sizing-4",
347347
data=df.to_dict("rows"),
348348
columns=[
@@ -366,7 +366,7 @@ def layout():
366366
in that case
367367
"""
368368
),
369-
dash_table.Table(
369+
dash_table.DataTable(
370370
id="sizing-5",
371371
data=df.to_dict("rows"),
372372
columns=[
@@ -390,7 +390,7 @@ def layout():
390390
in that case
391391
"""
392392
),
393-
dash_table.Table(
393+
dash_table.DataTable(
394394
id="sizing-6",
395395
data=df.to_dict("rows"),
396396
columns=[

tests/dash/app_styling.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def layout():
352352
# ...
353353

354354
section_title('Dash Table - Row Padding'),
355-
dash_table.Table(
355+
dash_table.DataTable(
356356
id="styling-2",
357357
data=df.to_dict("rows"),
358358
columns=[
@@ -371,7 +371,7 @@ def layout():
371371
# ...
372372

373373
section_title('Dash Table - Dark Theme with Cells'),
374-
dash_table.Table(
374+
dash_table.DataTable(
375375
id="styling-6",
376376
data=df.to_dict("rows"),
377377
columns=[
@@ -410,7 +410,7 @@ def layout():
410410
# ...
411411

412412
section_title('Dash Table - Highlighting Certain Columns'),
413-
dash_table.Table(
413+
dash_table.DataTable(
414414
id="styling-9",
415415
data=df.to_dict("rows"),
416416
columns=[
@@ -432,7 +432,7 @@ def layout():
432432
),
433433

434434
section_title('Dash Table - Highlighting Certain Cells'),
435-
dash_table.Table(
435+
dash_table.DataTable(
436436
id="styling-10",
437437
data=df.to_dict("rows"),
438438
columns=[

0 commit comments

Comments
 (0)