Skip to content

[Bug]: Undefined array key "type" when used inside Fabricator Page builder #20

@momostafa

Description

@momostafa

What happened?

Hi,
First thanks for the awesome component!

I am getting Undefined array key "type" when used inside Fabricator Page builder.
if I comment out // ->withFields I don't get error and the form is save don't in the expected data structure.

Also doesn't work when used in public livewire component the search input is disabled and keeps loading.

Thanks in advance for looking into this issue

How to reproduce the bug

Create Fabricator Page block

`<?php

namespace App\Filament\Fabricator\PageBlocks;

use Tapp\FilamentGoogleAutocomplete\Forms\Components\GoogleAutocomplete;
use Filament\Forms\Components\TextInput;

class Appointment extends PageBlock
{

public static function getBlockSchema(): Block
{
    return Block::make('appointment')
        ->label(__('Appointment'))
        ->icon('heroicon-o-clock')
        ->schema([
                    GoogleAutocomplete::make('settings.address_search')
                    //->dehydrated(false)
                    ->label('Address look-up')
                    ->visible(function (Get $get) {
                        if($get('settings.location') == 'offline'){
                            return true;
                        }
                    })
                    ->withFields([
                        TextInput::make('settings.address')
                        ->label(__('Offline Meeting Location'))
                        ->placeholder('Room 1, Building 2, 3 Rue de la Paix, 75001 Paris, France')
                        ->extraInputAttributes([
                            'data-google-field' => '{street_number} {route}, {sublocality_level_1}, {postal_code} {locality} {country}',
                        ])
                        ->required(),
                        TextInput::make('settings.latlng')
                        ->label(__('Offline Meeting Corrdinates'))
                        ->placeholder('lat,lng ex: 48.8566,2.3522')
                        ->extraInputAttributes([
                            'data-google-field' => '{latitude},{longitude}',
                        ])
                        ->required(),
                    ]),
        ]),`

Package Version

1.0.9

PHP Version

8.2.27

Laravel Version

11.42.1

Which operating systems does with happen with?

macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions