@@ -2,7 +2,7 @@ import React from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
4
4
5
- const ExternalComponent = ( { id, text, input_id } ) => {
5
+ const ExternalComponent = ( { id, text, input_id, extra_component } ) => {
6
6
const ctx = window . dash_component_api . useDashContext ( ) ;
7
7
const ExternalWrapper = window . dash_component_api . ExternalWrapper ;
8
8
@@ -15,6 +15,14 @@ const ExternalComponent = ({ id, text, input_id }) => {
15
15
value = { text }
16
16
componentPath = { [ ...ctx . componentPath , 'external' ] }
17
17
/>
18
+ {
19
+ extra_component &&
20
+ < ExternalWrapper
21
+ componentType = { extra_component . type }
22
+ componentNamespace = { extra_component . namespace }
23
+ componentPath = { [ ...ctx . componentPath , 'extra' ] }
24
+ { ...extra_component . props }
25
+ /> }
18
26
</ div >
19
27
)
20
28
}
@@ -23,6 +31,11 @@ ExternalComponent.propTypes = {
23
31
id : PropTypes . string ,
24
32
text : PropTypes . string ,
25
33
input_id : PropTypes . string ,
34
+ extra_component : PropTypes . exact ( {
35
+ type : PropTypes . string ,
36
+ namespace : PropTypes . string ,
37
+ props : PropTypes . object ,
38
+ } ) ,
26
39
} ;
27
40
28
41
export default ExternalComponent ;
0 commit comments