Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frozen index breaks table widget #7150

Closed
scottdraves opened this issue Apr 10, 2018 · 0 comments
Closed

frozen index breaks table widget #7150

scottdraves opened this issue Apr 10, 2018 · 0 comments

Comments

@scottdraves
Copy link
Contributor

scottdraves commented Apr 10, 2018

Run the following Python3 code:

from beakerx import *
z = TableDisplay([])
z.model = {'alignmentForColumn': {},
 'alignmentForType': {},
 'cellHighlighters': [],
 'columnNames': ['time'],
 'columnOrder': [],
 'columnsFrozen': {"time":True},
 'columnsFrozenRight': {},
 'columnsVisible': {},
 'contextMenuItems': [],
 'contextMenuTags': {},
 'fontColor': [],
 'hasDoubleClickAction': False,
 'hasIndex': 'true',
 'headersVertical': False,
 'rendererForColumn': {},
 'rendererForType': {},
 'stringFormatForColumn': {},
 'stringFormatForType': {},
 'subtype': 'Dictionary',
 'tooManyRows': False,
 'tooltips': [],
 'type': 'TableDisplay',
 'timeZone': 'UTC',
 'types': ['datetime'],
 'values': [['1420174800.0']]}
z

get the following JS stack trace:

selectors.ts:128 Uncaught (in promise) TypeError: Cannot read property 'index' of undefined
    at selectors.ts:128
    at index.js:76
    at index.js:36
    at index.js:90
    at index.js:36
    at ColumnPosition.getColumnByPosition (ColumnPosition.ts:72)
    at DataGridResize.setInitialSectionWidth (DataGridResize.ts:89)
    at DataGridResize.setInitialSectionWidths (DataGridResize.ts:84)
    at DataGridResize.setInitialSize (DataGridResize.ts:49)
    at BeakerxDataGrid.init (BeakerxDataGrid.ts:121)

the issue seems to be 'columnsFrozen': {"time":True}, which is redundant because it's the index, but should not break it. The old tables handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants