Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

[Feature Request] trigger repeatable events in javascript #158

Open pxpm opened 2 years ago

pxpm commented 2 years ago

Feature Request

What's the feature you think Backpack should have?

I think one easy way of manipulating the repeatable rows, without having to overwrite the whole repeatable blade file is by adding some events into repeatable lifecycle.

The ones I am thinking rigth now is backpack.before_new_repeatable_row(repeatableElement, repeatableFieldGroupClone) and backpack.after_new_repeatable_row(repeatableElement) we can add the order events and row delete events.

Most notable usecases:

Have you already implemented a prototype solution, for your own project?

Not yet

Do you see this as a core feature or an add-on?

I think it brings alot of benefits from a very small thing as triggering events on our side. I would say core yes.

tabacitu commented 2 years ago

I love it ❤️ This is how we should be thinking in the future. We don't do stuff necessarily, we provide events and hooks, so that people can easily build their own customizations. It's a COULD, but a pretty nice one in principle.

My first pass at events (from your text), for future us: