Skip to content

Commit 0daf684

Browse files
committed
Fix missing id from ExternalWrapper.
1 parent 43af268 commit 0daf684

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

dash/dash-renderer/src/wrapper/ExternalWrapper.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ function ExternalWrapper({
5151
useEffect(() => {
5252
batch(() => {
5353
dispatch(updateProps({itempath: componentPath, props}));
54-
dispatch(notifyObservers({id: props.id, props}));
54+
if (props.id) {
55+
dispatch(notifyObservers({id: props.id, props}));
56+
}
5557
});
5658
}, [props]);
5759

tests/integration/renderer/test_external_component.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def test_rext001_render_external_component(dash_duo):
2323
},
2424
},
2525
),
26+
ExternalComponent(
27+
id="without-id",
28+
text="without-id",
29+
),
2630
html.Div(html.Div(id={"type": "output", "index": 1}), id="out"),
2731
]
2832
)
@@ -53,3 +57,5 @@ def click(*_):
5357

5458
dash_duo.find_element("#extra > div").click()
5559
dash_duo.wait_for_text_to_equal("#out", "clicked")
60+
61+
assert dash_duo.get_logs() == []

0 commit comments

Comments
 (0)