Skip to content

Commit

Permalink
fix(filter toggle button): ensure button appears (#581)
Browse files Browse the repository at this point in the history
The container wasn't being wrapped in a jQuery tag, meaning the button wasn't properly appended
to the DOM.

Use the jQuery-wrapped container instead.
  • Loading branch information
gregtyler authored Mar 13, 2024
1 parent d61ba5a commit fbe6407
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MOJFrontend.FilterToggleButton.prototype.setupResponsiveChecks = function() {
MOJFrontend.FilterToggleButton.prototype.createToggleButton = function() {
this.menuButton = $('<button class="govuk-button '+this.options.toggleButton.classes+'" type="button" aria-haspopup="true" aria-expanded="false">'+this.options.toggleButton.showText+'</button>');
this.menuButton.on('click', $.proxy(this, 'onMenuButtonClick'));
this.options.toggleButton.container.append(this.menuButton);
this.container.append(this.menuButton);
};

MOJFrontend.FilterToggleButton.prototype.checkMode = function(mq) {
Expand Down

0 comments on commit fbe6407

Please sign in to comment.