File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
dash/dash-renderer/src/actions Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -340,15 +340,19 @@ function updateComponent(component_id: any, props: any) {
340
340
341
341
function sideUpdate ( outputs : any , dispatch : any ) {
342
342
toPairs ( outputs ) . forEach ( ( [ id , value ] ) => {
343
- let componentId , propName ;
344
- if ( id . includes ( '.' ) ) {
343
+ let componentId = id ,
344
+ propName ;
345
+
346
+ if ( id . startsWith ( '{' ) ) {
347
+ const index = id . lastIndexOf ( '}' ) ;
348
+ if ( index + 2 < id . length ) {
349
+ propName = id . substring ( index + 2 ) ;
350
+ componentId = JSON . parse ( id . substring ( 0 , index + 1 ) ) ;
351
+ } else {
352
+ componentId = JSON . parse ( id ) ;
353
+ }
354
+ } else if ( id . includes ( '.' ) ) {
345
355
[ componentId , propName ] = id . split ( '.' ) ;
346
- } else {
347
- componentId = id ;
348
- }
349
-
350
- if ( componentId . startsWith ( '{' ) ) {
351
- componentId = JSON . parse ( componentId ) ;
352
356
}
353
357
354
358
const props = propName ? { [ propName ] : value } : value ;
You can’t perform that action at this time.
0 commit comments