Reset button deactivated but still there

Created on 5 June 2024, 20 days ago
Updated 18 June 2024, 7 days ago

Hi,
My config is Drupal 10.2.6 with theme Bootstrap 5.
Since the update to 6.0.6, I have a problem with the reset button. It's deactivated in the view, nevertheless it's still visible in the page (empty, without value/text).

Here is the code with 6.0.3 :

<div data-drupal-selector="edit-actions" class="form-actions js-form-wrapper form-wrapper" id="edit-actions">

    <input data-bef-auto-submit-click="" class="js-hide button js-form-submit form-submit btn btn-primary" data-drupal-selector="edit-submit-v01-espace-presse" type="submit" id="edit-submit-v01-espace-presse" value="Appliquer" />

</div>

Here is the code for the same with version 6.0.6 :

<div data-drupal-selector="edit-actions" class="form-actions js-form-wrapper form-wrapper" id="edit-actions">

    <input data-bef-auto-submit-click="" class="js-hide button js-form-submit form-submit btn btn-primary" data-drupal-selector="edit-submit-v01-espace-presse" type="submit" id="edit-submit-v01-espace-presse" value="Appliquer" />

    <input data-drupal-selector="edit-reset-v01-espace-presse" type="submit" id="edit-reset-v01-espace-presse" name="reset" value="" class="button js-form-submit form-submit btn btn-primary" />

</div>

As you can see, the submit button is still in the code even if deactivated, but at least it has the class "js-hide". The reset button doesn't.
I enclose a print screen to show the result.

(I can play with CSS/JS to hide it until the correction)

Thanks in advance.

πŸ› Bug report
Status

Needs review

Version

7.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @Lucky723
  • Status changed to Postponed: needs info 16 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So tried replicating on fresh install of 10.3.x and not seeing the issue described. Any additional info/steps you can add?

  • Indeed, I have a second View. I've deactivated the reset button and it doesn't appear anymore (expected behavior). BEF setup are the same.
    In the export of each view I find :

    View with error : reset_button_always_show: true
    View without error : reset_button_always_show: false

    Would it help if I post the export of the View ?

  • I've found where the problem is.

    When you check "Include a reset button", some new choices appear, including "Always show reset button".

    If you check "Always show reset button" but then you uncheck "Include a reset button", the value "reset_button_always_show" remains TRUE.
    In the previous version "reset_button_always_show" turned to FALSE if you uncheck "Include a reset button".

    Thanks.

  • Status changed to Needs work 15 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Sounds like the states api needs some work for that scenario

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • Status changed to Needs review 7 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Lets see if that fixes it.

Production build 0.69.0 2024