Conversation
- column name nested prop update (support array of strings) - fix errors in demo app
| id: 'table', | ||
| data, | ||
| columns: clone(mockData.columns).map(col => R.merge(col, { | ||
| name: col.name || col.id, |
There was a problem hiding this comment.
Fixing react warnings that appeared after tightening the column props
package.json
Outdated
| { | ||
| "name": "dash-table", | ||
| "version": "3.1.0rc9", | ||
| "version": "3.1.0rc10", |
There was a problem hiding this comment.
bump version
| name: PropTypes.oneOfType([ | ||
| PropTypes.arrayOf(PropTypes.string), | ||
| PropTypes.string | ||
| ]).isRequired, |
There was a problem hiding this comment.
Typing for column name was incorrect. It accepts a string or an array of strings (for multiline headers)
| } | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Moving the block of code related to styling the cells and making it a mixin that accepts one parameter (isListView) -- follow up styling and mixin calls is based on that variable
|
|
||
| & when (@isListView = False) { | ||
| .inset-shadow(red, 1px, 1px, -1px, -1px); | ||
| } |
There was a problem hiding this comment.
td.focused and .dash-filter.invalid styling moved here to make isListView variable available
| // .shadow(red, 1px, 1px, 0, 0); | ||
| .outline-shadow(var(--accent), 1px, 1px, 0, 0); | ||
| border: 1px solid var(--accent); | ||
| margin: -1px; |
There was a problem hiding this comment.
Style fragments unaffected by table style are left as is.
| editable_name?: boolean | number; | ||
| id: ColumnId; | ||
| name: string; | ||
| name: string | string[]; |
There was a problem hiding this comment.
array of strings support
| sorting_settings?: SortSettings; | ||
| sorting_type?: SortingType; | ||
| sorting_treat_empty_string_as_none?: boolean; | ||
| style_as_list_view?: boolean; |
There was a problem hiding this comment.
adding this back
| .add('with frozen rows and frozen columns', () => (<DashTable | ||
| {...props4} | ||
| n_fixed_columns={1} | ||
| n_fixed_rows={1} |
There was a problem hiding this comment.
Same tests as for the standard style but for the list view style.
chriddyp
left a comment
There was a problem hiding this comment.
Looks good to me. I wasn't sure if we'd keep style_as_list_view or if we'd just document how to override the styles via style_cell, but this looks like it turned out pretty good.
…view # Conflicts: # CHANGELOG.md # dash_table/bundle.js # dash_table/demo.js # dash_table/metadata.json # src/dash-table/Table.js
|
@chriddyp Overriding with style_cell gets into a lot of special cases when taking into consideration the fixed rows and columns. We may even want to provide a special way to override the shadow style in the future as doing so manually forces you to deal with all (too many) edge cases. |

PR for:
Some clean up for: