Problem/Motivation

Barrio provides 3 options for checkbox/radio elements: default, sliders, and buttons. When combined with auto-submitting ajax views, the button styling breaks the submit functionality.

Steps to reproduce

  • Create a view with exposed radio button filters.
  • Put the exposed filter in a block and enable ajax.
  • My implementation uses Better Exposed Filters to hide the submit button. But I don't think this is a necessary step in recreating the issue.
  • With the checkbox/radio form styling set to default, this should still work.
  • Change the theme form settings to use button styling on checkbox/radio buttons.
  • Now auto-submit is broken.

Proposed resolution

Remove the autosubmit="false" attribute from the twig template:

    {% if checkbox_style == 'form-button' %}
      <input{{ input_attributes.addClass(inputclass).setAttribute('autocomplete', 'off') }}>
    {% else %}
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sim_1 created an issue. See original summary.

sim_1’s picture

Status: Active » Needs review
vishwenderbaloria’s picture

Checked at my end, seems to be working fine.

hatuhay’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.