Bug report: "Search" button not styled with SearchBuilder and Bootstrap 5

Bug report: "Search" button not styled with SearchBuilder and Bootstrap 5

NessalcNessalc Posts: 1Questions: 1Answers: 0

Link to test case:
The issue can be seen in the example given on this very site, here.

Click the "Add Condition" button and examine the "Search button that appears to the right. It is not styled with the rest of the buttons.

I've tested this on Chrome and Firefox with identical results.

Description of problem:
The SearchBuilder "Search" button is not styled with Bootstrap 5 as the remainder of the buttons are--it's a blocky button like "the old days". Because of how it's generated, I can't use jQuery $('.dtsb-search.dtsb-button').addClass('btn').addClass('btn-secondary'); during the initComplete callback or the overall $(document).ready block, only in my console.

Instead of adding a bunch of CSS that mirrors BS5 just for this one button, I delved into the source, and found what I believe to be the fix for this. What I've done is added, between lines 61 and 62 of searchBuilder.bootstrap5.js

search: "btn btn-secondary dtsb-search"

This fixes the issue, but it would be nice if it were in the CDN version of the file.

Answers

  • allanallan Posts: 63,451Questions: 1Answers: 10,465 Site admin

    Hi,

    Many thanks for flagging that up. I totally forgot about that aspect when I added that feature recently. That is the fix committed and it will be in the next release.

    Regards,
    Allan

Sign In or Register to comment.