mxc
Select Input populated via db query and setting default option?
I tried this to test but still can't get the right option selected:
public function mount()
{
$this->customer = Models\Customer::find(1);
}
I think there are 2 issues. Setting a default value with "default" doesn't work as the options array is being loaded asynchronously so the value is not available when "default" fires. Secondly how to change the selected option when the action button is clicked. Please let me know if I am anwsering your question. Maybe I misunderstood.10 replies
Select Input populated via db query and setting default option?
Hi @Leonardo Ferreira , I am using it in a form builder. Its a custom page. If I could figure out how to change a selects value programatically I think I could find a way to do what I need to do. Basically I have a form and an page header action. When the page header action button is clicked I want it to change the values in the drop down box based on what a varibale values is.
10 replies
Object of class Filament\Support\Enums\MaxWidth could not be converted to string
Dam. Just after posting Google finally returns
https://github.com/filamentphp/filament/issues/9908
4 replies
extraAttributes() for tables
You can use extraAttibutes method.
https://filamentphp.com/docs/3.x/tables/columns/getting-started#custom-attributes
6 replies
How to have an Action with a url() method, execute code before opening the link?
Ok so I can do something like this in the blade template.
is there a way to have this added to the action in the form definition programatically? I.E. I don't need to go and move my actions out of the form to make them blade templates?
12 replies
How to have an Action with a url() method, execute code before opening the link?
Thanks @Homd when I tried this it would log the click when the url is generated for the page and not when it was clicked so it would record a click per page view. Let me test again.
12 replies
Select component with searchable & live?
Thanks for the tip. I used orderBy for the sorting. It didn't solve my problem. I have in the meantime created another form with different models and linked select components and it works fine. I have no idea what the difference betweenthem is that causes the 1 to work and the other not. I am investigating. The code is the same excpet for the models being queried.
4 replies
Custom route with path parameters for custom page
Ok the error is due to as I had it registered for navigation and it requires an id in the url. I removed it from the navigation component with "protected static bool $shouldRegisterNavigation = false;" Now it works.
8 replies