How to add only edit form to a livewire component.

Hey there!
I'm trying to build filament form inside livewire component but I want only edit form, when user click on edit action it should open edit form with data prefilled.
I've tried installing it from documentation, but somehow its not working.
Right now on click of edit button it's not opening any model, also the form field 'Reason' and submit button showing like attaching in screenshot.
Is there anything I'm doing wrong.
class BookedSlots extends Component implements HasTable, HasForms
{
    use InteractsWithTable, InteractsWithForms;
    public ?array $data = [];
    public function mount()
    {
        $this->form->fill(Slot::with('event')->get()->toArray());
    }
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                TextInput::make('reason'),
            ])
            ->statePath('data')
            ->model(Slot::class);
    }
    public function create(): void
    {
        $data = $this->form->getState();
        dd($data);
        $this->record->update($data);
    }
    public function table(Table $table): Table
    {
        return $table
            ->query(Slot::with('event')->where('user_id', Auth::id()))
            ->columns([
                TextColumn::make('event.name')->searchable()->sortable()->label('Event Name')
            ])
            ->actions([
                EditAction::make(),
            ]);
     }

blade component code.
<div class="p-6 text-gray-900 dark:text-gray-100">
    <form wire:submit="create">
        {{ $this->form }}

        <button type="submit">
            Submit
        </button>
    </form>
    <x-filament-actions::modals />
    {{ $this->table }}
 </div>
     

Thanks!
image.png
Was this page helpful?