@@ -23,7 +23,7 @@ const getSpinner = spinnerType =>
23
23
const Loading = ( {
24
24
children,
25
25
loading_state,
26
- mode ,
26
+ display ,
27
27
color,
28
28
className,
29
29
style,
@@ -90,8 +90,8 @@ const Loading = ({
90
90
91
91
// delay_hide and delay_show is from dash-bootstrap-components dbc.Spinner
92
92
useEffect ( ( ) => {
93
- if ( mode === 'on ' || mode === 'off ' ) {
94
- setShowSpinner ( mode === 'on ' ) ;
93
+ if ( display === 'show ' || display === 'hide ' ) {
94
+ setShowSpinner ( display === 'show ' ) ;
95
95
return ;
96
96
}
97
97
@@ -126,7 +126,7 @@ const Loading = ({
126
126
}
127
127
}
128
128
}
129
- } , [ delay_hide , delay_show , loading_state , mode ] ) ;
129
+ } , [ delay_hide , delay_show , loading_state , display ] ) ;
130
130
131
131
const Spinner = showSpinner && getSpinner ( spinnerType ) ;
132
132
@@ -165,7 +165,7 @@ Loading.defaultProps = {
165
165
delay_show : 0 ,
166
166
delay_hide : 0 ,
167
167
show_initially : true ,
168
- mode : 'auto' ,
168
+ display : 'auto' ,
169
169
} ;
170
170
171
171
Loading . propTypes = {
@@ -250,9 +250,9 @@ Loading.propTypes = {
250
250
} ) ,
251
251
252
252
/**
253
- * Setting mode to "on " or "off " will override the loading state coming from dash-renderer
253
+ * Setting display to "show " or "hide " will override the loading state coming from dash-renderer
254
254
*/
255
- mode : PropTypes . oneOf ( [ 'auto' , 'on ' , 'off ' ] ) ,
255
+ display : PropTypes . oneOf ( [ 'auto' , 'show ' , 'hide ' ] ) ,
256
256
257
257
/**
258
258
* Add a time delay (in ms) to the spinner being removed to prevent flickering.
0 commit comments