Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While Using this package with livewire components are not re rendering. #67

Open
missingsemicolononline8 opened this issue Jul 26, 2023 · 1 comment

Comments

@missingsemicolononline8

While Using this package with livewire components are not re rendering.

@willvincent
Copy link
Owner

willvincent commented Aug 2, 2023

I don't think this is an issue with this package, as all it really does is provide the relationships and some helper functions to get/set ratings/votes.

I'd need to see what you're doing to help you find why it's not updating, but I suspect that the data in your livewire component isn't changing, so there is nothing to re-render, and/or you may need to simply trigger a refresh.

I've got a few places in livewire in an app that i have to manually trigger a refresh, accomplished by:

protected $listeners = [
    'refresh' => '$refresh',
];

public function some_method()
{
    // Do stuff here
    
    // Force refresh the component:
    $this->emitSelf('refresh');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants