-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFR] Use reference input #3313
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
02c488b
refactor ReferenceInputController into a function component
ThieryMichel 4b3f748
replace hoc by hook
ThieryMichel a9acc8a
extract useFilterState in its own file
ThieryMichel 1caedca
rename useReference to useReferenceField and add more generic useRefe…
ThieryMichel 7c59c95
add useReferenceSearch hook
ThieryMichel 8d00d20
sipmler useReferenceSearch hook
ThieryMichel d60bc81
rename useReferenceSearch to useMatchingReferences
ThieryMichel cab8d99
initialize selector on mount for useMatchingReferences and useReferen…
ThieryMichel d63e242
WIP
ThieryMichel 72deb25
fix TestContext to not mutate its default store
ThieryMichel 9ae131b
add test on useReference and useMatchingReferences
ThieryMichel 3e9e879
add test on usePaginationState hook
ThieryMichel 96ad01f
move hooks helper in util and use UsePrevious and useDeepCompareEffec…
ThieryMichel a55ca2f
add test on useSortState
ThieryMichel f152f8a
add test on useFilterState
ThieryMichel 970ebe8
update ReferenceInputCOntroller test
ThieryMichel 9513bd8
fix test
ThieryMichel 64e2d24
prettier
ThieryMichel bfc329c
Update packages/ra-core/src/controller/useFilterState.spec.ts
ThieryMichel aaeb45d
Update packages/ra-core/src/controller/input/useMatchingReferences.ts
ThieryMichel f933e9d
Update packages/ra-core/src/controller/input/useMatchingReferences.ts
ThieryMichel bf5dc6c
Update packages/ra-core/src/controller/useReference.spec.ts
ThieryMichel 0bb73be
Update packages/ra-core/src/controller/useReference.spec.ts
ThieryMichel cd6b801
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel 65b38c6
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel a6209f3
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel 2d76d39
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel 0d3f70f
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel 6586b7f
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel 3ce3cdf
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel 44e8f9d
Update packages/ra-core/src/controller/input/useMatchingReferences.sp…
ThieryMichel c01c08d
Update packages/ra-core/src/controller/input/ReferenceInputController…
ThieryMichel 352aadc
Update packages/ra-core/src/controller/usePaginationState.spec.ts
ThieryMichel 753a7ff
code review
ThieryMichel ffd69d5
merge renderHookWIthRedux with renderHook
ThieryMichel d4653df
add jsdoc on renderHook
ThieryMichel 11b0683
update useReference and useReferenceField hook doc
ThieryMichel 79b11f6
add useReferenceInput hook
ThieryMichel 7a1fd18
code review
ThieryMichel 7f33c2f
have sort reducer use action
ThieryMichel 1d69a5c
add setSort usage in jsdoc
ThieryMichel 0a3535d
replace useReferenceField by getResourceLinkPath without useReference
ThieryMichel 03da9bb
code review
ThieryMichel d71b5ab
refactor useGetMatchingReference to stop using createSelector
ThieryMichel 0f51d8a
fix ReferenceManyField
ThieryMichel 4bcb951
fix ReferenceFieldCOntroller
ThieryMichel 173cb12
code review
ThieryMichel 70b1358
Typo fix s/props/prop/
sedy-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import ReferenceArrayFieldController from './ReferenceArrayFieldController'; | ||
import ReferenceFieldController from './ReferenceFieldController'; | ||
import ReferenceManyFieldController from './ReferenceManyFieldController'; | ||
import useReference from './useReference'; | ||
import getResourceLinkPath from './getResourceLinkPath'; | ||
import useReferenceArray from './useReferenceArray'; | ||
import useReferenceMany from './useReferenceMany'; | ||
|
||
export { | ||
useReferenceArray, | ||
ReferenceArrayFieldController, | ||
ReferenceFieldController, | ||
useReference, | ||
getResourceLinkPath, | ||
useReferenceMany, | ||
ReferenceManyFieldController, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a BC break ; please add a migration guide in the UPDATE.md file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And btw, why renaming it ?