File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed
@plotly/dash-generator-test-component-typescript
components/dash-core-components/src/components
dash/dash-renderer/src/wrapper Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 11// Needs to export types if not in a d.ts file or if any import is present in the d.ts
22import React from 'react' ;
3- import { DashComponent } from '@dash-renderer/types' ;
3+
4+ type DashComponent = {
5+ props : string ;
6+ namespace : string ;
7+ children ?: [ ] ;
8+ }
49
510
611type Nested = {
Original file line number Diff line number Diff line change 33 "jsx" : " react" ,
44 "baseUrl" : " src/ts" ,
55 "paths" : {
6- "@dash-renderer/*" : [" ../../../../dash/dash-renderer/src/*" ]
76 },
87 "inlineSources" : true ,
98 "sourceMap" : true ,
Original file line number Diff line number Diff line change @@ -121,9 +121,9 @@ function Tabs({
121121 const firstChildren : TabProps = window . dash_component_api . getLayout (
122122 [ ...children [ 0 ] . props . componentPath , 'props' ]
123123 ) ;
124- return firstChildren . value ;
124+ return firstChildren . value ?? 'tab-1' ;
125125 }
126- return undefined ;
126+ return 'tab-1' ;
127127 } ;
128128
129129 // Initialize value on mount if not set
@@ -271,7 +271,11 @@ function Tabs({
271271 ) ;
272272}
273273
274- Tabs . dashPersistence = true ;
274+ Tabs . dashPersistence = {
275+ persisted_props : [ PersistedProps . value ] ,
276+ persistence_type : PersistenceTypes . local ,
277+ } ;
278+
275279Tabs . dashChildrenUpdate = true ;
276280
277281export default Tabs ;
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ function DashWrapper({
391391
392392 if ( node !== undefined ) {
393393 if ( isArray ) {
394- for ( let j = 0 ; j < ( node as [ ] ) . length ; j ++ ) {
394+ for ( let j = 0 ; j < node . length ; j ++ ) {
395395 const aPath = concat ( [ opath ] , [ j ] ) ;
396396 props = assocPath (
397397 aPath ,
You can’t perform that action at this time.
0 commit comments