dhis2 / ui

Components and related resources for the DHIS2 design system
https://ui.dhis2.nu
BSD 3-Clause "New" or "Revised" License
40 stars 15 forks source link

fix(selectorbar): handle components other than SelectorBarItem correctly #1534

Closed alaa-yahia closed 3 months ago

alaa-yahia commented 4 months ago

Description

This pull request addresses an issue with the SelectorBar component when it is passed children components other than SelectorBarItem. The existing logic for managing focus relies on components forwarding refs, which causes failures when other components that don't forward refs are passed as children.

Changes:

Updated the focus management logic to avoid relying on forwarded refs. Ensured that the SelectorBar component behaves correctly regardless of the types of child components passed.


Checklist

dhis2-bot commented 4 months ago

🚀 Deployed on https://pr-1534--dhis2-ui.netlify.app

dhis2-bot commented 3 months ago

:tada: This PR is included in version 9.10.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: