Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293522

Select's #empty_option gets removed on ajax callback

$
0
0

Problem/Motivation

From #44 we learned that select element adds #empty_option in Select::processSelect. However, if a select element is updated (re-rendered?) on an ajax callback, the #empty_option gets removed.

The original issue reported this behavior of one such instance at /admin/config/development/configuration/single/export.

Proposed resolution

Add #empty_option in a #pre_render callback

Remaining tasks

Provide patch to fix the issue.

Write a test to prevent regression.

Code review and validate the used approach.


Viewing all articles
Browse latest Browse all 293522

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>