[Bug] `IndexTable` `loading` prop does not always re-render loading UI when changed
LA1CH3 opened this issue · 1 comments
Summary
Basically, it seems that the loading
prop does not re-render the “loading” banner when the loading
prop changes. In fact, it seems you can basically never go from false
to true
and see it re-render. Only if you are going from true
to false
will you see it. So, if the table is initially rendered with loading={true}
and then you have some flag that sets loading={false}
will you see it disappear. But if the table initially renders with loading={false}
and then some action causes loading={true}
, the banner does not appear.
Expected behavior
The "loading <resource name>"
UI should re-appear whenever the loading
prop changes to true
.
Actual behavior
Once the IndexTable
is at any time rendered with loading={false}
, the "Loading" UI will never be shown until the component is completely re-mounted.
Steps to reproduce
- Click "Toggle loading"
- Observe the "loading" UI does not show
- In the code, change the default value of
isLoading
totrue
- Observe loading UI is shown.
- Click "Toggle loading" and observe loading UI goes away.
- Try clicking "Toggle loading" again and observe loading UI does not re-appear.
Are you using React components?
Yes
Polaris version number
12.23.0
Browser
Chrome
Device
Macbook
+1 on this issue. I am having the same issue.