fix: [DHIS2-21708] Org unit selector is expanded when form open if no org unit in top bar#4629
fix: [DHIS2-21708] Org unit selector is expanded when form open if no org unit in top bar#4629henrikmv wants to merge 23 commits into
Conversation
… DataEntry components
… accessibility improvements
|
🚀 Deployed on https://deploy-preview-4629.capture.netlify.dhis2.org |
… tracker working lists
| render() { | ||
| const { value } = this.props; | ||
| return value ? this.renderSelectedOrgUnit(value) : this.renderOrgUnitField(); | ||
| return value ? this.renderSelectedOrgUnit(value) : this.renderCollapsedOrgUnitField(); |
There was a problem hiding this comment.
Was this bug confirmed by Product or UX? I am asking because it doesn't look like a bug to me. The org unit component is expanded throughout the entire app (e.g in forms with OrgUnit TEAs or DEs, when adding a new relationship, or when linking events, etc.). The only place that comes to mind where it is currently collapsed is the Context Top bar. So, in general, we seem to tend to have it expanded by default if there is space. I've attached a few examples where it appears expanded, but there are many others.
Thank you!
|



DHIS2-21708
Refactors the
SingleOrgUnitSelectFieldfrom an always-visible org unit tree into a collapsed dropdown with a popover. When no value is selected, the user sees a combobox trigger with a chevron icon. Clicking it opens aPopovercontaining the org unit tree, with a debounced search input embedded in the trigger.Key changes:
SingleOrgUnitSelectField: replaces inline tree with a trigger +Popoverpattern, adds keyboard navigation, debounced search, and open/close state management.OrgUnitField: addshideSearchFieldandsearchTextprops so the parent can control search externally.