Skip to content

Commit

Permalink
remove column.hidden (but keep capabilities) (plotly#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Andre-Rivet committed Jun 18, 2019
1 parent 2740f4f commit 6f98d1d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 95 deletions.
4 changes: 3 additions & 1 deletion packages/dash-table/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
#### REMOVED
- `column.clearable`: Allows clearing the value of a dropdown cell.
Removed in favor of `dropdown_**` `clearable` nested property.
- `column.hidden`: Allows hiding column
Removed. Stay tuned by following https://github.com/plotly/dash-table/issues/314.
- `column.options`
Removed. Redundant with `dropdown`.
- `pagination_settings`
Expand Down Expand Up @@ -43,7 +45,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- `n_fixed_columns`: Will fix columns to the left.
Renamed to `fixed_columns`
Now accepts an object { headers: boolean, data: number } instead of a number.
{ headers: true } determines the number of columns to fix automatically. For example, if the rows are selectable or deletable, { headers: true } would fix those columns automatically. If { headers: true, data: 2 }, it would fix the first two data columns in addition to the selectable and deletable if visible.
{ headers: true } determines the number of columns to fix automatically. For example, if the rows are selectable or deletable, { headers: true } would fix those columns automatically. If { headers: true, data: 2 }, it would fix the first two data columns in addition to the selectable and deletable if visible.
- `n_fixed_rows`: Will fix rows to the top.
Renamed to `fixed_rows`
Now accepts an object { headers: boolean, data: number } instead of a number.
Expand Down
8 changes: 0 additions & 8 deletions packages/dash-table/src/dash-table/dash/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,6 @@ export const propTypes = {
specifier: PropTypes.string
}),

/**
* If True, then the column and its data is hidden.
* This can be useful if you want to transport extra
* meta data (like a data index) to and from callbacks
* but you don't necessarily want to display that data.
*/
hidden: PropTypes.bool,

/**
* The `id` of the column.
* The column `id` is used to match cells in data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ storiesOf('DashTable/Headers', module)
{ name: ['Year', ''], id: 'year' },
{ name: ['City', 'Montreal'], id: 'montreal' },
{ name: ['City', 'Toronto'], id: 'toronto' },
{ name: ['City', 'Ottawa'], id: 'ottawa', hidden: true },
{ name: ['City', 'Ottawa'], id: 'ottawa' },
{ name: ['City', 'Vancouver'], id: 'vancouver' },
{ name: ['Climate', 'Temperature'], id: 'temp' },
{ name: ['Climate', 'Humidity'], id: 'humidity' }
Expand Down
85 changes: 0 additions & 85 deletions packages/dash-table/tests/visual/percy-storybook/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,91 +386,6 @@ export default [
}
},

{
name: 'hidden-columns',
props: {
id: 'table',
editable: true,
selected_cells: [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]],
active_cell: [1, 1],
columns: [
{
name: 'Column 1',
id: 'column-1'
},
{
name: 'Column 2',
id: 'column-2',
hidden: true
},
{
name: 'Column 3',
id: 'column-3'
},
{
name: 'Column 4',
id: 'column-4'
}
],
data: [
{'column-1': 1, 'column-2': 'alpha', 'column-3': 2, 'column-4': 1},
{'column-1': 2, 'column-2': {data: 'whatever im hidden who cares'}, 'column-3': 2, 'column-4': 1},
{'column-1': 3, 'column-2': true, 'column-3': 2, 'column-4': 1},
{'column-1': 4, 'column-2': 'delta', 'column-3': 2, 'column-4': 1}
]
}
},

{
name: 'hidden-columns-with-merged-headers',
props: {
id: 'table',
editable: true,
selected_cells: [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]],
active_cell: [1, 1],
merge_duplicate_headers: true,
columns: [
{
name: ['Columns', 'Column 1'],
id: 'column-1'
},
{
name: ['Columns', 'Column 2'],
id: 'column-2',
hidden: true
},
{
name: ['Columns', 'Column 3'],
id: 'column-3'
},
{
name: ['Columns', 'Column 4'],
id: 'column-4'
},
{
name: ['Colors', 'Blue'],
id: 'column-5'
},
{
name: ['Colors', 'Red'],
id: 'column-6',
hidden: true

},
{
name: ['Colors', 'Orange'],
id: 'column-7'
}
],
data: [
{'column-1': 1, 'column-2': 'alpha', 'column-3': 2, 'column-4': 1, 'column-5': 1, 'column-6': 2, 'column-7': 1},
{'column-1': 2, 'column-2': {data: 'whatever im hidden who cares'}, 'column-3': 2, 'column-4': 1, 'column-5': 1, 'column-6': 2, 'column-7': 1},
{'column-1': 3, 'column-2': true, 'column-3': 2, 'column-4': 1, 'column-5': 1, 'column-6': 2, 'column-7': 1},
{'column-1': 4, 'column-2': 'delta', 'column-3': 2, 'column-4': 1, 'column-5': 1, 'column-6': 2, 'column-7': 1}
]
}
},

{
name: 'per-cell dropdowns',
props: {
Expand Down

0 comments on commit 6f98d1d

Please sign in to comment.