czehnter
czehnter
FFilament
Created by czehnter on 3/10/2025 in #❓┊help
How to make data in Livewire component reactive?
Thanks, it works this way! I decided to wrap it in a Group since I don't need a Section there. This has to be a hack though right?
13 replies
FFilament
Created by czehnter on 3/10/2025 in #❓┊help
How to make data in Livewire component reactive?
Can you simply use {{ $record }} in your view without any further configuration this way?
13 replies
FFilament
Created by czehnter on 3/10/2025 in #❓┊help
How to make data in Livewire component reactive?
Could you give an example? I didn't use the ViewField because I thought you can't use closures for dynamic data inside of ->viewData().
13 replies
FFilament
Created by czehnter on 2/14/2025 in #❓┊help
How to sort navigation items within a navigation group?
Thanks, $navigationSort actually does work within navigation groups as well. I was thrown off by the sorting of a third-party plugin page.
4 replies
FFilament
Created by czehnter on 2/13/2025 in #❓┊help
Notifications not working on custom `create` view
I found the problem – I had conflicting CSS classes in the blade template that prevented the notifications from being shown 🤦‍♂️
7 replies
FFilament
Created by czehnter on 12/11/2024 in #❓┊help
How to use all available Tailwind classes in custom ViewRecord page?
You can compensate some problems by defining colors in the tailwind.config.js like this:
theme: {
extend: {
colors: {
gray: colors.slate,
primary: colors.slate,
warning: colors.red,
success: colors.green,
danger: colors.red,
info: colors.slate,
}
}
}
theme: {
extend: {
colors: {
gray: colors.slate,
primary: colors.slate,
warning: colors.red,
success: colors.green,
danger: colors.red,
info: colors.slate,
}
}
}
But this isn't perfect either. Some colors are not being used this way. I haven't found out why.
13 replies
FFilament
Created by czehnter on 12/11/2024 in #❓┊help
How to use all available Tailwind classes in custom ViewRecord page?
This is my setup right now: - XXXPanelProvider.php: ->viteTheme('resources/css/app.css') - run npm install tailwindcss if you haven't added it already - app.css:
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind base;
@tailwind components;
@tailwind utilities;
- tailwind.config.js:
import defaultTheme from "tailwindcss/defaultTheme";
import colors from "tailwindcss/colors";
import forms from "@tailwindcss/forms";
import typography from "@tailwindcss/typography";
import defaultTheme from "tailwindcss/defaultTheme";
import colors from "tailwindcss/colors";
import forms from "@tailwindcss/forms";
import typography from "@tailwindcss/typography";
This way I can use all available tailwind classes in my blade files. The downside is that some native filament color attributes won't work anymore (for example ->color('success') won't be green anymore etc.). I haven't found a way to fix this yet.
13 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I also tried using the default FileUpload field instead and it doesn't work there either. I also found someone else with the same problem, so at least I'm not alone 😅 https://github.com/filamentphp/filament/issues/12368
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I tested different disks, but the result is always the same. I also tried using the documented method for custom names and then just returning the original name in it, but this also doesn't change anything:
->getUploadedFileNameForStorageUsing(
fn(TemporaryUploadedFile $file): string => (string) str($file->getClientOriginalName()),
)
->getUploadedFileNameForStorageUsing(
fn(TemporaryUploadedFile $file): string => (string) str($file->getClientOriginalName()),
)
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I was referring to the filename in storage, I'm not using ->downloadable(). So with this config, the files won't be renamed on the storage in your environment?
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I might be wrong, but I don't think the Spatie Media Library is renaming files by default. It seems like it is the standard filament behaviour and preserveFilenames() is just not working.
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
No luck, it was already at the end.
12 replies
FFilament
Created by czehnter on 12/11/2024 in #❓┊help
How to use all available Tailwind classes in custom ViewRecord page?
Importing forms and typography definitely helped. But it seems like once I add ->viteTheme(), the color palette defined with ->colors() doesn't work anymore, so all the colored buttons etc. in the panel are broken.
13 replies
FFilament
Created by czehnter on 11/8/2024 in #❓┊help
Toggle buttons not working in form integrated in custom ViewRecord page
The solution seems to be that all Toggle elements have to be defined in the ViewRecord class like this: public ?array $data = ['removal' => false]
2 replies
FFilament
Created by czehnter on 9/25/2024 in #❓┊help
Triggering afterStateUpdated() with $set()?
Ah it actually does. Thanks, I somehow missed that. Is there any other way to do this apart from using afterStateUpdated()?
7 replies