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

BelongsTo relationship issue #487

Open
msucevan opened this issue Nov 10, 2023 · 2 comments
Open

BelongsTo relationship issue #487

msucevan opened this issue Nov 10, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@msucevan
Copy link

msucevan commented Nov 10, 2023

Basically, when I'm using BelongsTo field outside the addLayout is working good.

But when I'm trying to use a Flexible field and I'm trying to use BelongsTo inside addLayout method this is not working.

            Flexible::make(__('Parameter'), 'parameter')
                ->addLayout(__('Parameter'), 'parameter', [
                    BelongsTo::make(__('Param'), 'param', Param::class)
                        ->sortable()
                        ->rules('required'),
                ])
                ->button(__('Add Parameter'))
@Senexis
Copy link

Senexis commented Nov 13, 2023

As a workaround, you can use a Select field with pluck() to list all your relations, but this would be nice to have regardless.

@toonvandenbos toonvandenbos added the enhancement New feature or request label Nov 13, 2023
@msucevan
Copy link
Author

Thank you for the reply. I was just wondering if was supported or not, I will use the workaround that you mentioned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants