Skip to content

Commit

Permalink
Merge pull request #5731 from marmelab/Fix-ReferenceInput-does-not-sh…
Browse files Browse the repository at this point in the history
…ow-loaded-while-data-is-loading

Fix ReferenceInput does not show loader while possible values and reference record are loading
  • Loading branch information
djhi authored Jan 4, 2021
2 parents 127a968 + 82c04da commit 549af03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe('<ReferenceInputController />', () => {
choices: [{ id: 1 }],
error: null,
filter: { q: '' },
loading: false,
loading: true,
pagination: { page: 1, perPage: 25 },
sort: { field: 'title', order: 'ASC' },
warning: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const useReferenceInputController = (
// kept for backwards compatibility
// @deprecated to be removed in 4.0
error: dataStatus.error,
loading: dataStatus.waiting,
loading: !possibleValuesLoaded || !referenceLoaded,
filter: filterValues,
setFilter,
pagination,
Expand Down

0 comments on commit 549af03

Please sign in to comment.