Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateAction and default value #207

Open
adrien-delhom opened this issue Jul 31, 2024 · 0 comments
Open

CreateAction and default value #207

adrien-delhom opened this issue Jul 31, 2024 · 0 comments

Comments

@adrien-delhom
Copy link

adrien-delhom commented Jul 31, 2024

Hi 👋

I'm not sure if this is a package issue.

The default values don't come up, and neither does the current tenant. To remedy this, I manually inject ($form->fill()) the default data and the primary key of the tenant.

protected function headerActions(): array
{
    return [
        Actions\CreateAction::make()
            ->mountUsing(function (Form $form, array $arguments) {}) # works well if comment this
            ->slideOver(),
    ];
}

public function getFormSchema(): array
{
    return [
        TextInput::make('test')
            ->default('hello world') # this not appear
    ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant