filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
18.07k stars 2.83k forks source link

Laravel filament form components not rendering properly. #4293

Closed PeranoXx closed 2 years ago

PeranoXx commented 2 years ago

Package

filament/forms

Package Version

2.16

Laravel Version

9.19

Livewire Version

2.5

PHP Version

8.0.2

Problem description

Hello! I am facing issue in filament form components not rendering properly in livewire component.

Multi select not working image

Toggle color not showing, image image

File upload component not rendering image

image

and also all components are render perfectly in admin panel.

Expected behavior

it should render in livewire component same as admin

Steps to reproduce

image

Reproduction repository

ttps://github.com

Relevant log output

No response

github-actions[bot] commented 2 years ago

Hey @PeranoXx! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public Git repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

Z3d0X commented 2 years ago

I see you don't have public properties for all of your fields.

For your fields to hold data, they should have a corresponding property on your Livewire component, just as in Livewire normally.

https://filamentphp.com/docs/2.x/forms/getting-started#initializing-forms

Alternative is to scope all data to a single property: https://filamentphp.com/docs/2.x/forms/getting-started#scoping-form-data-to-an-array-property

atmonshi commented 1 year ago

I think you're missing the js and/or CSS calls

@filamentStyles
@filamentScripts
kuldeepBacancy commented 1 year ago

Hello,

I'm getting the same error the difference is I'm using filament EditRecord and it's having the same type of issue. Look at my code and let me know what can be done to resolve the issue.

image

Thank you in advance.