Hide array elements on admin panel #6420
vladvlasov256
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our team has been working on the admin panel which includes geographical data. We created a custom route editor for that.
The routes are arrays of points. Every point has its coordinates. Some points may include metadata, for example, name. We call them points of interest or checkpoints, they are white marks on the map. All other points are presented as gray marks.
The array is displayed on the sidebar. A route may contain 1,000 points and a maximum of 50 checkpoints. Only the checkpoints should be displayed on the sidebar. So we decided to patch the
ArrayField
and add a new propertyrowFilter
. Here is an example:isCheckpoint
is a hidden property that defines whether or not it's a point of interest. The patchedArrayField
excludes regular points from the elements. Thus an admin may access only the checkpoint fields.My question: is it a helpful feature for other Payload users? Then we can provide a PR for it. Also, we'd like to hear suggestions from the maintainers regarding this case.
Another patch we made is
isSortable
flag but as I can see it's already been added to the main branch 🎉Beta Was this translation helpful? Give feedback.
All reactions