© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
14 replies
Mark Chaney

Run Action from Javascript.

Unfortunately cant just use wire:click since this is within javascript, so im forced to use a Livewire:emit and then my listener looks like so
  public function showProperty($propertyId)
    {
        // ViewPropertyAction::class
        ray($propertyId);
        $property = Property::find($propertyId);
        return $this->mountAction('view_property')
            ->record($property);

    }
  public function showProperty($propertyId)
    {
        // ViewPropertyAction::class
        ray($propertyId);
        $property = Property::find($propertyId);
        return $this->mountAction('view_property')
            ->record($property);

    }
. Now the problem is that the action isnt actually used anywhere on the page, which i think is part of the problem. I know its not as simple as returning my actual action with the record as that doesnt actually execute it. I think im close. But missing something simple.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Trigger action from javascript?
FilamentFFilament / ❓┊help
3y ago
how to run javascript after clicking an action
FilamentFFilament / ❓┊help
2y ago
Call async JavaScript function from a Action
FilamentFFilament / ❓┊help
2y ago
Table action, update record from within javascript.
FilamentFFilament / ❓┊help
3y ago