Closed RobertBoes closed 3 years ago
Approved...
Hey there @RobertBoes! Thanks so much for your ongoing work with Inertia.js, and for this contribution. However, in the interest of keeping this particular demo as simple as possible, I think I'm going to pass on this PR. It might make for an excellent blog post though! Hope that makes sense. 👍
At Discord there was some confusion about partial reloads. The use-case that was mention was quite interesting: a sidebar list with all items and an edit screen next to it. There was quite some discussion and trial/error going on, because this only seemed possible to do with inertiajs/inertia#315 or with persistent layouts. @chefhasteeth came up with the solution to leverage Partial Reloads for this, by lazy evaluating the whole list it's possible to load a sub-view without loading the full list again. At first it didn't seem to work, but later we managed to get it working :)
In my own project I would combine the two routes into a single route, and then using an optional parameter to load the individual report. But the example in this PR is more in-line with the rest of the controllers and might give a better overview to users looking for examples.
I hope this would be a good addition to the demo app :)