Title: Can not read properties of undefined 'X' · Issue #950 · plotly/dash-table · GitHub
Open Graph Title: Can not read properties of undefined 'X' · Issue #950 · plotly/dash-table
X Title: Can not read properties of undefined 'X' · Issue #950 · plotly/dash-table
Description: Using virtualization=True and style_data_conditional throws an error of 'can not read properties of undefined column_name'. Here is an MWE to test with, scroll down a bit on the table and then select a cell in the last column. I created ...
Open Graph Description: Using virtualization=True and style_data_conditional throws an error of 'can not read properties of undefined column_name'. Here is an MWE to test with, scroll down a bit on the table and then sele...
X Description: Using virtualization=True and style_data_conditional throws an error of 'can not read properties of undefined column_name'. Here is an MWE to test with, scroll down a bit on the table and t...
Opengraph URL: https://github.com/plotly/dash-table/issues/950
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can not read properties of undefined 'X'","articleBody":"Using virtualization=True and style_data_conditional throws an error of 'can not read properties of undefined column_name'. Here is an MWE to test with, scroll down a bit on the table and then select a cell in the last column. I created a topic on the community forum and the results were it seems to be a bug. [Community Topic](https://community.plotly.com/t/cannot-read-properties-of-undefined/67103/2)\r\n\r\n````\r\nimport dash\r\nimport dash_table\r\nimport dash_html_components as html\r\nfrom dash.dependencies import Input, Output, State, MATCH, ALL\r\nimport pandas as pd\r\n\r\napp = dash.Dash(__name__)\r\n\r\ndf = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/Emissions%20Data.csv').reset_index()\r\ndf['Emission'] = df['Emission'].map(lambda x: '{0:.2f}'.format(x))\r\n\r\napp.layout = html.Div([html.Div([], id='test'), dash_table.DataTable(\r\n id='table',\r\n data=df.to_dict('records'),\r\n columns=[{'id': c, 'name': c} for c in df.columns],\r\n editable=True,\r\n filter_action=\"native\",\r\n sort_action=\"native\",\r\n sort_mode=\"multi\",\r\n page_action=\"none\",\r\n\t\tfixed_rows={'headers': True, 'data': 0},\r\n\t\t#sort_action='native',\r\n\t\texport_format=\"xlsx\",\r\n\t\texport_headers=\"display\",\r\n\t\texport_columns='all',\r\n\t\t#filter_action='native',\t\t\r\n virtualization=True,\r\n\t\tstyle_data_conditional=[{\r\n\t\t\t\t\t'if': {\r\n\t\t\t\t\t\t'filter_query': '{Emission} \u003e 0',\r\n\t\t\t\t\t\t'column_id': 'Emission'\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'color': 'green'\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t'if': {\r\n\t\t\t\t\t\t'filter_query': '{Emission} \u003c 0',\r\n\t\t\t\t\t\t'column_id': 'Emission'\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'color': 'red'\r\n\t\t\t\t}],\r\n\t\ttooltip_conditional=[\r\n\t\t\t{\r\n\t\t\t\t'if': {\r\n\t\t\t\t\t'filter_query': '{Emission} \u003c 0',\r\n\t\t\t\t\t\t'column_id': 'Emission'\r\n\t\t\t\t\t\t},\r\n\t\t\t\t'value': 'Further review required, calculated demand is 20% lower than the 3 year average units sold'\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t'if': {\r\n\t\t\t\t\t'filter_query': '{Emission} \u003e 0',\r\n\t\t\t\t\t\t'column_id': 'Emission'\r\n\t\t\t\t\t\t},\r\n\t\t\t\t'value': 'Further review required, calculated demand is 20% higher than the 3 year average units sold'\r\n\t\t\t},\r\n\t\t]\r\n)\r\n])\r\n\r\n\r\n@app.callback(Output('test', 'children'), [Input('table', 'active_cell')])\r\ndef updateIT(ac):\r\n\tif ac:\r\n\t\treturn ac['column_id']\r\n\telse:\r\n\t\treturn ''\r\n\t\r\n\t\r\nif __name__ == '__main__':\r\n\tapp.run_server(debug=True)\r\n````\r\n\r\n","author":{"url":"https://github.com/croll12-creator","@type":"Person","name":"croll12-creator"},"datePublished":"2022-08-28T11:35:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/950/dash-table/issues/950"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f1021809-157b-7768-1a4e-9e2690af0de0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC82:29748D:3064A24:4115C9B:6A5DC147 |
| html-safe-nonce | 01409c146ab766a30e54ca73fa45b6b74c52325204385ef2083334c87970e5a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzgyOjI5NzQ4RDozMDY0QTI0OjQxMTVDOUI6NkE1REMxNDciLCJ2aXNpdG9yX2lkIjoiMTY5NzYxMDQ3ODY0MDgwODI2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4e520a5414755e2bd2efcf7264e73edcc4642674d5e971b139098bc2143ad846 |
| hovercard-subject-tag | issue:1353326747 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/dash-table/950/issue_layout |
| twitter:image | https://opengraph.githubassets.com/23bc55830e1435dfd5d44e02435e77b2203b669bef0ef56e458725679bd49022/plotly/dash-table/issues/950 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/23bc55830e1435dfd5d44e02435e77b2203b669bef0ef56e458725679bd49022/plotly/dash-table/issues/950 |
| og:image:alt | Using virtualization=True and style_data_conditional throws an error of 'can not read properties of undefined column_name'. Here is an MWE to test with, scroll down a bit on the table and then sele... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | croll12-creator |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/dash-table git https://github.com/plotly/dash-table.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 128151266 |
| octolytics-dimension-repository_nwo | plotly/dash-table |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 128151266 |
| octolytics-dimension-repository_network_root_nwo | plotly/dash-table |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width