Skip to content
New issue

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

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

Already on GitHub? # to your account

Bug [LiveCollectionType] [Embeded Forms] [Dependent Fields] #9

Open
xDeSwa opened this issue Oct 27, 2023 · 0 comments
Open

Bug [LiveCollectionType] [Embeded Forms] [Dependent Fields] #9

xDeSwa opened this issue Oct 27, 2023 · 0 comments

Comments

@xDeSwa
Copy link

xDeSwa commented Oct 27, 2023

hi, i use livecomponent (LiveCollectionType of form)

Look at video ,
listing all items after render

How should I find a solution to this issue?

screen-recorder-fri-oct-27-2023-14-38-34.webm

Codes:

$builder = new DynamicFormBuilder($builder);
        $builder
            ->add(child: 'secenek', type: EntityType::class, options: [
                'class' => UrunSecenekler::class,
                'label' => false,
                'placeholder' => 'Seçenek seçiniz...',
                'autocomplete' =>true
            ])
            ->addDependent('secenektanim', 'secenek', function (DependentField $field, ?UrunSecenekler $secenek) {
                $field->add(EntityType::class, [
                    'class' => UrunSeceneklerTanimlar::class,
                    'placeholder' => null === $secenek ? 'ilk önce Seçenek Seçiniz' : sprintf('"%s" için Tanım seçiniz', $secenek),
                    'choices' => $secenek?->geturunSeceneklerTanimlar(),
                    'disabled' => null === $secenek,
                    'label' => false,
                    'autocomplete' => true,
                ]);
            }
            );
    }

Thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant