Magikstah
Magikstah
FFilament
Created by Magikstah on 7/24/2023 in #❓┊help
Reactive Builder field
I've defined schema in my form like this:
TextInput::make('section_name')
->autofocus()
->reactive()
->afterStateUpdated(fn(\Closure $set) => $set('Test', 'test'))
->required(),

Builder::make('section_content')
->blocks([
Builder\Block::make('Image Carousel')
->schema([
Forms\Components\Repeater::make('slide')
->schema([
//inputs..
])
]),
])
->reactive()
->afterStateUpdated(fn(\Closure $set) => $set('Test', 'test'))
->maxItems(1)
])

Forms\Components\Group::make()
->schema([
Forms\Components\Section::make('Preview')->schema([
TextInput::make('Test')
->reactive(),
])
])
TextInput::make('section_name')
->autofocus()
->reactive()
->afterStateUpdated(fn(\Closure $set) => $set('Test', 'test'))
->required(),

Builder::make('section_content')
->blocks([
Builder\Block::make('Image Carousel')
->schema([
Forms\Components\Repeater::make('slide')
->schema([
//inputs..
])
]),
])
->reactive()
->afterStateUpdated(fn(\Closure $set) => $set('Test', 'test'))
->maxItems(1)
])

Forms\Components\Group::make()
->schema([
Forms\Components\Section::make('Preview')->schema([
TextInput::make('Test')
->reactive(),
])
])
Lets say my code looks like this (had to cut few things beacuse its too long but I think this should be enough) Changing value of Section Name text input changes Test input value to test like It's expected to, but adding block in block builder doesnt trigger any change, maybe i've put afterStateUpdated and reactive in bad place?
5 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
Moving colors in tailwind config from module.export -> theme to module.export -> theme -> extends and removing plugin with addUtilities() resulted in fixing error, thanks everyone for your time im marking this as solved
21 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
Seems pretty much like my code, problem comes from Filament's vendor CSS file
21 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
Vite doesnt build aswell:
/vendor/filament/forms/dist/module.esm.css:1545:3: The `border-gray-300` class does not exist. If `border-gray-300` is a custom class, make sure it is defined within a `@layer` directive.
/vendor/filament/forms/dist/module.esm.css:1545:3: The `border-gray-300` class does not exist. If `border-gray-300` is a custom class, make sure it is defined within a `@layer` directive.
21 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
mix('css/filament.css')
mix('css/filament.css')
is good, since removing
@import '../../vendor/filament/filament/resources/css/app.css';
@import '../../vendor/filament/filament/resources/css/app.css';
from filament.css leads to complete file build and breaking whole css on filament pages
21 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
Yop - versions:
"autoprefixer": "^10.4.14",
"tailwindcss": "^3.3.3",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"laravel-mix": "^6.0.49",
"tippy.js": "^6.3.7",
"autoprefixer": "^10.4.14",
"tailwindcss": "^3.3.3",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"laravel-mix": "^6.0.49",
"tippy.js": "^6.3.7",
21 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
In boot i have
Filament::registerTheme(
mix('css/filament.css'),
);
Filament::registerTheme(
mix('css/filament.css'),
);
But obviously it results in error since mix cant build filament.css, removing other files from mix doesnt change anything tho
21 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
Filament.css
@import '../../vendor/filament/filament/resources/css/app.css';
@import '../../vendor/filament/filament/resources/css/app.css';
This from-gray-200 class comes from app.css that is located in Filament package -
.filament-login-page form::before {
@apply absolute inset-x-0 mx-auto h-px w-2/3 bg-gradient-to-r from-gray-200 via-primary-400 to-gray-200 dark:from-gray-700 dark:via-primary-400 dark:to-gray-700;
.filament-login-page form::before {
@apply absolute inset-x-0 mx-auto h-px w-2/3 bg-gradient-to-r from-gray-200 via-primary-400 to-gray-200 dark:from-gray-700 dark:via-primary-400 dark:to-gray-700;
Directory:
vendor/filament/filament/resources/css/app.css
vendor/filament/filament/resources/css/app.css
21 replies
FFilament
Created by Magikstah on 7/20/2023 in #❓┊help
Laravel mix error - when trying to build filament theme
Sure, webpack.mix.js
// webpack.mix.js

let mix = require('laravel-mix');

mix.js("resources/js/app.js", "public/js")
.postCss("resources/css/app.css", "public/css", [
require("tailwindcss"),
])
.postCss("resources/css/filament.css", "public/css", [
require("tailwindcss"),
])
.postCss("resources/css/authpage.css", "public/css", [
require("tailwindcss"),
])
.copyDirectory('resources/assets/fonts', 'public/fonts');
// webpack.mix.js

let mix = require('laravel-mix');

mix.js("resources/js/app.js", "public/js")
.postCss("resources/css/app.css", "public/css", [
require("tailwindcss"),
])
.postCss("resources/css/filament.css", "public/css", [
require("tailwindcss"),
])
.postCss("resources/css/authpage.css", "public/css", [
require("tailwindcss"),
])
.copyDirectory('resources/assets/fonts', 'public/fonts');
postcss.config.js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Laravel v9.52 filament v2.17.5
21 replies
FFilament
Created by Magikstah on 5/6/2023 in #❓┊help
Form Select Component doesn't want to take default() value
I've removed vendor and poped composer install and filament upgrade and everything seems working without default
9 replies
FFilament
Created by Magikstah on 5/6/2023 in #❓┊help
Form Select Component doesn't want to take default() value
I mean everything is filled at this point, if i create for example TextInput there email will fill input, but by creating select component i have placeholder selected
9 replies
FFilament
Created by Magikstah on 5/6/2023 in #❓┊help
Form Select Component doesn't want to take default() value
Edit page
9 replies
FFilament
Created by Magikstah on 3/15/2023 in #❓┊help
Markdown Editor
Thank you! 🙂
3 replies