File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
dash/dash-renderer/src/wrapper Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {DashConfig} from '../config';
23
23
import { notifyObservers , onError , updateProps } from '../actions' ;
24
24
import { getWatchedKeys , stringifyId } from '../actions/dependencies' ;
25
25
import { recordUiEdit } from '../persistence' ;
26
- import { createElement , isDryComponent } from './wrapping' ;
26
+ import { createElement , getLoadingState , isDryComponent } from './wrapping' ;
27
27
import Registry from '../registry' ;
28
28
import isSimpleComponent from '../isSimpleComponent' ;
29
29
import {
@@ -57,7 +57,7 @@ function DashWrapper({
57
57
const config : DashConfig = useSelector ( selectConfig ) ;
58
58
59
59
// Select both the component and it's props.
60
- const [ component , componentProps , loading_state ] = useSelector (
60
+ const [ component , componentProps ] = useSelector (
61
61
selectDashProps ( componentPath ) ,
62
62
selectDashPropsEqualityFn
63
63
) ;
@@ -171,7 +171,11 @@ function DashWrapper({
171
171
) ;
172
172
173
173
const extraProps = {
174
- loading_state,
174
+ loading_state : getLoadingState (
175
+ component ,
176
+ componentPath ,
177
+ ( store . getState ( ) as any ) . loadingMap
178
+ ) ,
175
179
setProps,
176
180
...extras
177
181
} ;
Original file line number Diff line number Diff line change @@ -8,18 +8,13 @@ import {
8
8
} from '../types/component' ;
9
9
import { getLoadingState } from './wrapping' ;
10
10
11
- type SelectDashProps = [ DashComponent , BaseDashProps , DashLoadingState ] ;
11
+ type SelectDashProps = [ DashComponent , BaseDashProps ] ;
12
12
13
13
export const selectDashProps =
14
14
( componentPath : DashLayoutPath ) =>
15
15
( state : any ) : SelectDashProps => {
16
16
const c = path ( componentPath , state . layout ) as DashComponent ;
17
- const loading_state = getLoadingState (
18
- c ,
19
- componentPath ,
20
- state . loadingMap
21
- ) ;
22
- return [ c , c . props , loading_state ] ;
17
+ return [ c , c . props ] ;
23
18
} ;
24
19
25
20
export function selectDashPropsEqualityFn (
You can’t perform that action at this time.
0 commit comments