From 5c7db0fdc15ec9582d5b4f5c4a8804b139c1373c Mon Sep 17 00:00:00 2001 From: Saul Clavijo Date: Mon, 25 Nov 2019 23:10:59 -0300 Subject: [PATCH] [Autocomplete] Show loading text when there are no options --- packages/material-ui-lab/src/Autocomplete/Autocomplete.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js index f236baa0ec710b..bd6f52c52ff4e2 100644 --- a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js +++ b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js @@ -378,7 +378,9 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) { open > - {loading ?
{loadingText}
: null} + {loading && groupedOptions.length === 0 ? ( +
{loadingText}
+ ) : null} {groupedOptions.length === 0 && !freeSolo && !loading ? (
{noOptionsText}
) : null}