Skip to content

Commit 2ffbe54

Browse files
committed
Add comments
1 parent 58ffb37 commit 2ffbe54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/ra-core/src/controller/input/useReferenceArrayInputController.ts

+4
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ const useReferenceArrayInputController = (
274274
basePath: basePath.replace(resource, reference),
275275
choices: dataStatus.choices,
276276
currentSort: sort,
277+
// For the ListContext, we don't want to always display the selected items first.
278+
// Indeed it wouldn't work well regarding sorting and pagination
277279
data:
278280
matchingReferences && matchingReferences.length > 0
279281
? indexById(matchingReferences)
@@ -283,6 +285,8 @@ const useReferenceArrayInputController = (
283285
filterValues,
284286
hasCreate: false,
285287
hideFilter,
288+
// For the ListContext, we don't want to always display the selected items first.
289+
// Indeed it wouldn't work well regarding sorting and pagination
286290
ids: matchingReferencesIds || [],
287291
loaded,
288292
loading: dataStatus.waiting,

0 commit comments

Comments
 (0)