diff --git a/CHANGELOG.md b/CHANGELOG.md index e3bb235dc6..082e64637f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +### Fixed + +- [#2015](https://github.com/plotly/dash/pull/2015) Fix bug [#1854](https://github.com/plotly/dash/issues/1854) in which the combination of row_selectable="single or multi" and filter_action="native" caused the JS error. + ### Changed - [#2016](https://github.com/plotly/dash/pull/2016) Drop the 375px width from default percy_snapshot calls, keep only 1280px diff --git a/components/dash-table/src/dash-table/components/EdgeFactory.tsx b/components/dash-table/src/dash-table/components/EdgeFactory.tsx index ebbf353e5c..faa0c279b8 100644 --- a/components/dash-table/src/dash-table/components/EdgeFactory.tsx +++ b/components/dash-table/src/dash-table/components/EdgeFactory.tsx @@ -151,6 +151,10 @@ export default class EdgeFactory { const iNext = 0; const iTarget = hTarget.rows - 1; + if (!isFinite(iTarget)) { + return; + } + R.forEach( j => !EdgeFactory.hasPrecedence( diff --git a/components/dash-table/tests/selenium/test_basic_operations.py b/components/dash-table/tests/selenium/test_basic_operations.py index 4fc1689a0f..43650d3a3b 100644 --- a/components/dash-table/tests/selenium/test_basic_operations.py +++ b/components/dash-table/tests/selenium/test_basic_operations.py @@ -426,3 +426,19 @@ def test_tbst023_sorted_table_delete_multiple_cells_while_selected(test, props): assert target.cell(row, col).get_text() == "" assert test.get_log_errors() == [] + + +def test_tbst024_row_selectable_filter_action(test): + app = dash.Dash(__name__) + + app.layout = DataTable( + id="test-table", + row_selectable="single", + filter_action="native", + ) + + test.start_server(app) + + test.wait_for_element("#test-table") + + assert test.get_log_errors() == []