nathan
nathan
FFilament
Created by nathan on 9/26/2024 in #❓┊help
Table and getting counts of records (groupBy)
No description
6 replies
FFilament
Created by nathan on 9/19/2024 in #❓┊help
modal scroll bug - can't select text and jumps to top when clicked.
I have a relation manager displaying a table with an action that will open that record's details in a modal window when clicked. That modal scrolls correctly. However, I'm unable to select any text in the modal window and after scrolling down a bit, when I click, it jumps me to the top of the modal window. I've gone through and removed all the infolist elements so it's a single modal window with a little bit of text. I can't double-click and select any text and it jumps to the top of the modal window when I click.
11 replies
FFilament
Created by nathan on 9/12/2024 in #❓┊help
Form Select - Search Across Relationship
I have 3 resources. - OfficeResource (Model: Office) - OfficeAddressResource (Model: OfficeAddress) - CountryResource (Model: Country) I have a form on the OfficeResource with a select field. This select field searches the OfficeAddress table and allows for the selection of an address. The OfficeAddress model has a hasone relationship with the model Country. Problem: On my OfficeResource form, I want to search by the address, city, and country.common_name in the address select form element. How would I accomplish this? (I would love to add something like ->searchable(['street_address', 'city', 'country.common_name']) But I know that's not possible. Here is the select element on the OfficeResource form:
Select::make('office_physical_address_id')
->label('Physical Address')
->relationship(name: 'physicalAddress', titleAttribute: 'street_address')
->getOptionLabelFromRecordUsing(fn(OfficeAddress $record) => $record->full_address)
->searchable(['street_address', 'city'])
->createOptionForm(OfficeAddressForm::getForm())
->editOptionForm(OfficeAddressForm::getForm())
->helperText('Click the + button to add a new address, or choose from the dropdown.')
->preload(),
Select::make('office_physical_address_id')
->label('Physical Address')
->relationship(name: 'physicalAddress', titleAttribute: 'street_address')
->getOptionLabelFromRecordUsing(fn(OfficeAddress $record) => $record->full_address)
->searchable(['street_address', 'city'])
->createOptionForm(OfficeAddressForm::getForm())
->editOptionForm(OfficeAddressForm::getForm())
->helperText('Click the + button to add a new address, or choose from the dropdown.')
->preload(),
5 replies
FFilament
Created by nathan on 6/18/2024 in #❓┊help
getURL() to call View Action on Table
I have an infolist connected to a View Action on a list table.
return $table
->columns([...])
->actions([
ViewAction::make()
->slideOver()
->infolist([...])
])
return $table
->columns([...])
->actions([
ViewAction::make()
->slideOver()
->infolist([...])
])
I have another resource that I want to call a getUrl() that points to the above list page and triggers the action so that the record's information slides over. Is this possible?
1 replies