Unnecessary validate in select type widgets

Created on 9 September 2024, 6 months ago
Updated 19 September 2024, 5 months ago

Problem/Motivation

It is not possible to select a different value when using a select widget with required fields in the configuration.

Steps to reproduce

- Add a plugin_reference type field to the entity with settings:

...
      ->setRequired(TRUE)
      ->setDisplayOptions('form', [
        'type' => 'plugin_reference_select',
        'settings' => ['provider_grouping' => FALSE],
      ])
      ->setDisplayOptions('view', ['type' => 'plugin_reference_label']);
...

The plugin configuration form must have the required fields.

- Go to the entity editing form
- Do not fill in the required form fields
- Try changing the selected value several times
- You will notice that the configuration form does not change

This will be very noticeable when plugins have different fields.

This happens because the form does not pass validation.

Proposed resolution

Validate only when trigger is a button

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇷🇺Russia lukasss Novoukrainskoe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024