#Disable Remove Row in Array Row?
11 messages · Page 1 of 1 (latest)
Original message from @upbeat meadow - Moved from #general message
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
Hey @upbeat meadow
Unfortunately array actions are not removable at this time. The only way to prevent the Remove row array action is to specify your array field as readOnly
there should be a prop passed to ArrayField to override the default delete or add method, it would be a great feature. thanks for answring
I agree, maybe make a github discussion on this?
My pleasure
Glad your issue was resolved! :tada: If you want to help make payload better, please give us a :star: on GitHub and review us - It helps us a lot.
maybe i will
- one for this
In the mean time, you can work around it with CSS:
- Add an admin.className attribute to the array field
- if you have set up tailwind, just add sth like
.participants-array .array-actions__remove {
display: none
}
with participants-array being your custom class
If you don't have tailwind set up, create a css file somewhere in the project and import it into app/(payload)/layout.tsx