File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ const Spinner = props => {
22
22
fullscreenClassName,
23
23
fullscreen_style,
24
24
debounce,
25
+ show_initially,
25
26
...otherProps
26
27
} = props ;
27
28
28
- const [ showSpinner , setShowSpinner ] = useState ( false ) ;
29
+ const [ showSpinner , setShowSpinner ] = useState ( show_initially ) ;
29
30
const timer = useRef ( ) ;
30
31
31
32
useEffect ( ( ) => {
@@ -121,7 +122,8 @@ const Spinner = props => {
121
122
Spinner . _dashprivate_isLoadingComponent = true ;
122
123
123
124
Spinner . defaultProps = {
124
- debounce : 0
125
+ debounce : 0 ,
126
+ show_initially : true
125
127
} ;
126
128
127
129
Spinner . propTypes = {
@@ -187,7 +189,13 @@ Spinner.propTypes = {
187
189
* When using the spinner as a loading spinner, add a time delay (in ms) to
188
190
* the spinner being removed to prevent flickering.
189
191
*/
190
- debounce : PropTypes . number
192
+ debounce : PropTypes . number ,
193
+
194
+ /**
195
+ * Whether the Spinner should show on app start-up before the loading state
196
+ * has been determined. Default True.
197
+ */
198
+ show_initially : PropTypes . bool
191
199
} ;
192
200
193
201
export default Spinner ;
You can’t perform that action at this time.
0 commit comments