Boolean checkbox does not properly update on the UI

Created on 25 June 2025, 2 days ago

Overview

We have a boolean base field added to the xb_page entity:

$fields['include_in_search'] = BaseFieldDefinition::create('boolean')
      ->setLabel(t('Index in search'))
      ->setDescription(t('Indicates whether this page should be excluded from search results.'))
      ->setDefaultValue(TRUE)
      ->setRevisionable(TRUE)
      ->setDisplayOptions('form', [
        'type' => 'boolean_checkbox',
        'weight' => 100,
      ])
      ->setDisplayConfigurable('form', TRUE);

When user clicks on the checkbox to turn on, it works fine, but when it is already turned on and user clicks again, the value updates, but the checkbox still shows it is turned on.

πŸ› Bug report
Status

Active

Version

0.0

Component

… to be triaged

Created by

πŸ‡­πŸ‡ΊHungary attilatilman

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

Comments & Activities

Production build 0.71.5 2024