withList Loading improved

Follows the recommanded loading from Apollo. See the Apollo docs about `[data.networkstatus](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-networkStatus)` and `[data.loading](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-loading)`
This commit is contained in:
Apollinaire 2018-05-03 10:27:23 +02:00
parent 94fc8fffe9
commit b6669a3f7e

View file

@ -154,7 +154,7 @@ const withList = (options) => {
results = props.data[listResolverName],
totalCount = props.data[totalResolverName],
networkStatus = props.data.networkStatus,
loading = props.data.networkStatus === 1,
loading = props.data.loading,
loadingMore = props.data.networkStatus === 2,
error = props.data.error,
propertyName = options.propertyName || 'results';