settings section expand/collapse go out of sync when searching

The following discussion from !90783 (merged) should be addressed:

  • @nickleonard started a discussion: (+2 comments)

    @rchanila Overall UX looks good!

    Approving as I don't think this has to be blocking, but did notice an issue with the search behavior — overall search works as expected, but the section expand buttons get out of sync with the state of the section. Sections matching search get expanded automatically but the button remains "Expand"; likewise when search is cleared the button remains "Collapse" though the section is collapsed.

    pkgs

    cc @katiemacoy for your awareness 😄