-
-
Notifications
You must be signed in to change notification settings - Fork 400
Closed
Labels
Description
Hi,
I'm using live component in multiple projects and I face now a case that confuses me.
In my case, I have some pagination values (first, last, next, previous) for a list (my component) of elements.
The initial value defined in my component:
#[LiveProp]
public int $currentPage = 1;
#[LiveProp]
public ?int $first = null;
#[LiveProp]
public ?int $previous = null;
#[LiveProp]
public ?int $next = null;
#[LiveProp]
public ?int $last = null;I have a method that changes those values in component init (thanks to ExposeInTemplate)
#[ExposeInTemplate]
public function initLessons(): void
{
... // adapting values
}Now, take a look at this dump I triggered in the component template:

We can see the values accessed through 'this' have been updated but not the values at the root ("liveprops" ?).
Is it an expected behaviour ?