Skip to content

Commit 2c0961a

Browse files
committed
changed prop name from mode to display
1 parent 2f0ab2d commit 2c0961a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

components/dash-core-components/src/components/Loading.react.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const getSpinner = spinnerType =>
2323
const Loading = ({
2424
children,
2525
loading_state,
26-
mode,
26+
display,
2727
color,
2828
className,
2929
style,
@@ -90,8 +90,8 @@ const Loading = ({
9090

9191
// delay_hide and delay_show is from dash-bootstrap-components dbc.Spinner
9292
useEffect(() => {
93-
if (mode === 'on' || mode === 'off') {
94-
setShowSpinner(mode === 'on');
93+
if (display === 'show' || display === 'hide') {
94+
setShowSpinner(display === 'show');
9595
return;
9696
}
9797

@@ -126,7 +126,7 @@ const Loading = ({
126126
}
127127
}
128128
}
129-
}, [delay_hide, delay_show, loading_state, mode]);
129+
}, [delay_hide, delay_show, loading_state, display]);
130130

131131
const Spinner = showSpinner && getSpinner(spinnerType);
132132

@@ -165,7 +165,7 @@ Loading.defaultProps = {
165165
delay_show: 0,
166166
delay_hide: 0,
167167
show_initially: true,
168-
mode: 'auto',
168+
display: 'auto',
169169
};
170170

171171
Loading.propTypes = {
@@ -250,9 +250,9 @@ Loading.propTypes = {
250250
}),
251251

252252
/**
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
254254
*/
255-
mode: PropTypes.oneOf(['auto', 'on', 'off']),
255+
display: PropTypes.oneOf(['auto', 'show', 'hide']),
256256

257257
/**
258258
* Add a time delay (in ms) to the spinner being removed to prevent flickering.

0 commit comments

Comments
 (0)