KarlisJ
KarlisJ
FFilament
Created by KarlisJ on 2/21/2024 in #❓┊help
prefix url for resource
Given I have UserResource for Admin panel, by default the url will be /admin/users . I can change the slug but it will only change the users part of url. I need /admin/prefix/users . Can this be achieved?
2 replies
FFilament
Created by KarlisJ on 12/4/2023 in #❓┊help
Display builders blocks in grid
Is it possible to display the builder block in columns? Repeater seems to have a grid method for that.
17 replies
FFilament
Created by KarlisJ on 11/15/2023 in #❓┊help
Query only toggled/displayed columns
I have a table with 100+ columns and for performance reasons the table displays only limited amount of them using toggleable( . However, all columns are selected from DB. First I thought that it's a bug, why wouldn't Filament select only the columns that are defined on table but then realised that developer can set state using full record. So I'm looking for a way to manually set the query with select( but for that I need to access toggled columns. Is there a way to do that?
15 replies
FFilament
Created by KarlisJ on 10/26/2023 in #❓┊help
Interact with input state and events using Alpine
No description
5 replies
FFilament
Created by KarlisJ on 10/25/2023 in #❓┊help
Group vs Grid layout component
I found a Group layout component in the source code but it's not documented. What's the difference from Grid?
2 replies
FFilament
Created by KarlisJ on 10/17/2023 in #❓┊help
Show table filters is slideover
I have a lot of filters so wanted to display them in a slideover instead of dropdown.
->filtersTriggerAction(
fn (\Filament\Tables\Actions\Action $action) => $action->slideOver(),
);
->filtersTriggerAction(
fn (\Filament\Tables\Actions\Action $action) => $action->slideOver(),
);
doesn't do the trick. I guess the question is how to open the filters in modal/slideover instead of dropdown?
2 replies
FFilament
Created by KarlisJ on 10/4/2023 in #❓┊help
Free text radio option
As a simple example, a radio field "Your favorite color?" with values red , green , and other (please specify) and when other is chosen input is shown that allows entering any value. I think this is quite common behaviour in web forms but struggle to find a good solution. I can have text input depending on radio and display it only when other` is selected but: 1 . The UI feels off, since they are separated out 2. I can't set the value of radio from input since it has fixed allowed values, so I have to create a third hidden field. Has someone created this setup?
6 replies
FFilament
Created by KarlisJ on 10/3/2023 in #❓┊help
Saving form as draft and validate all except `required`
I have a couple of long forms that I'd like to save as a draft after a field is blurred. Most fields have some specific validation, and due to technical constraints, that validation is crucial (there's no other validation before putting in DB) . Most of the fields are marked as ->required(). How can I achieve this? 1. What's the best way to update the draft on every change in any of fields? 2. How can I apply all validation rules except ->required() when updating draft? (The effect here would be that we're also giving instant feedback is field is not valid) Note, that I'm using the form in a custom Page inside the panel.
5 replies
FFilament
Created by KarlisJ on 9/23/2023 in #❓┊help
How to write test for navigation?
I have custom logic where I load navigation items from the database. In my tests, I need to call the base view for panel and assert that certain navigation items are there.
2 replies
FFilament
Created by KarlisJ on 8/24/2023 in #❓┊help
Open action modal from dropdown item
I'm probably making some silly mistake but I can't figure out how to open action modal from dropdown list blade component https://filamentphp.com/docs/3.x/support/blade-components/dropdown The example shows
<x-filament::dropdown.list.item wire:click="openDeleteModal">
Delete
</x-filament::dropdown.list.item>
<x-filament::dropdown.list.item wire:click="openDeleteModal">
Delete
</x-filament::dropdown.list.item>
But what exactly is openDeleteModal supposed to return?
15 replies
FFilament
Created by KarlisJ on 8/23/2023 in #❓┊help
Include latest hasMany record in table
I have a Members model with hasMany Payments relatinship. I want to show the latest payment date as a column in the Members table. Is that possible?
12 replies
FFilament
Created by KarlisJ on 7/25/2023 in #❓┊help
Custom field interacts with JS
I want to add Braintree Payment field to my form.
var button = document.querySelector('#submit-button');

braintree.dropin.create({
authorization: 'CLIENT_AUTHORIZATION',
container: '#dropin-container'
}, function (createErr, instance) {
button.addEventListener('click', function () {
instance.requestPaymentMethod(function (requestPaymentMethodErr, payload) {
// Submit payload.nonce to your server
});
});
});
var button = document.querySelector('#submit-button');

braintree.dropin.create({
authorization: 'CLIENT_AUTHORIZATION',
container: '#dropin-container'
}, function (createErr, instance) {
button.addEventListener('click', function () {
instance.requestPaymentMethod(function (requestPaymentMethodErr, payload) {
// Submit payload.nonce to your server
});
});
});
This is their simplest example. What would be the "filament" way of adding payload.nonce to the form.
15 replies
FFilament
Created by KarlisJ on 7/13/2023 in #❓┊help
Can I show bulk action only when a specific filter is selected?
I think I can use the ->vissible and pass closure but not sure which params should I resolve in that Closure and how to use them to achieve this
3 replies