Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit da999d5

Browse files
committed
Further refinement
1 parent 5f7e930 commit da999d5

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/components/Link.react.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default class Link extends Component {
5656
}
5757

5858
render() {
59-
const {className, style, id, href, loading_state} = this.props;
59+
const {className, style, id, href, loading_state, children} = this.props;
6060
/*
6161
* ideally, we would use cloneElement however
6262
* that doesn't work with dash's recursive
@@ -73,9 +73,9 @@ export default class Link extends Component {
7373
href={href}
7474
onClick={e => this.updateLocation(e)}
7575
>
76-
{isNil(this.props.children)
77-
? this.props.href
78-
: this.props.children}
76+
{isNil(children)
77+
? href
78+
: children}
7979
</a>
8080
);
8181
}

tests/integration/link/test_link_children.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,4 @@ def display_children(children):
2121

2222
dash_dcc.start_server(app)
2323

24-
href_as_children = dash_dcc.driver.execute_script(
25-
'''
26-
return document.getElementById("link1").text;
27-
'''
28-
)
29-
3024
dash_dcc.wait_for_text_to_equal("#link1", "/page-1")
31-
32-
assert href_as_children == "/page-1"

0 commit comments

Comments
 (0)