Skip to content

Commit e023e4f

Browse files
committed
Takes extras props directly from DashWrapper rest props
1 parent 9954a2a commit e023e4f

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

@plotly/dash-test-components/src/components/AddPropsComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const AddPropsComponent = (props) => {
77

88
return (
99
<div id={id}>
10-
{React.cloneElement(children, { extras: {
10+
{React.cloneElement(children, {
1111
receive: `Element #${id} pass`,
12-
}})}
12+
})}
1313
</div>
1414
);
1515
};

components/dash-core-components/src/components/ConfirmDialogProvider.react.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ export default class ConfirmDialogProvider extends React.Component {
2323
// Will lose the previous onClick of the child
2424
const wrapClick = child =>
2525
React.cloneElement(child, {
26-
extras: {
27-
onClick: () => setProps({displayed: true}),
28-
},
26+
onClick: () => setProps({displayed: true}),
2927
});
3028

3129
return (

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,13 @@ type DashWrapperProps = {
3939
* Path of the component in the layout.
4040
*/
4141
componentPath: DashLayoutPath;
42-
/**
43-
* extras props to be merged with the dash props from the store.
44-
*/
45-
extras?: any;
4642
_dashprivate_error?: any;
4743
};
4844

4945
function DashWrapper({
5046
componentPath,
51-
extras,
52-
_dashprivate_error
47+
_dashprivate_error,
48+
...extras
5349
}: DashWrapperProps) {
5450
const dispatch = useDispatch();
5551

0 commit comments

Comments
 (0)