valentin-morice / filament-sketchpad

A simple package that provides you with a sketchpad field in Filament
MIT License
8 stars 0 forks source link

Suggestions and comments #2

Open willcastillo opened 2 months ago

willcastillo commented 2 months ago

Hey, thanks for this plugin.

I have a suggestion:

A couple of comments:

And a question:

(free-draw is the name of my field.)

Any idea what am I doing wrong?

valentin-morice commented 2 months ago

Hi, thanks for the feedback. Good suggestion regarding button labels, I'll include those changes in the next release. Regarding your issue, do you think you could provide a reproduction repository, or at least the code generating your form?

willcastillo commented 2 months ago

Sure. Nothing fancy to be honest. As I said, it is dynamically generated but this is the portion that renders the field:

protected function getSketchpadComponent($field_id, $data): Component
    {
        return FilamentSketchpad::make($field_id)
            ->label($data['label'])
            ->height($data['height'])

            ->hint($data['hint'])
            ->helperText($data['helper'])

            ->columnSpan($data['columns-used']);
    }