fix(central-ui): InstancePicker — field above the backdrop; site change always closes; reference contract documented; tests
Three Task 2 review findings: 1. The outside-click backdrop is a fixed full-viewport layer at z-index 1040, but the input-group was unpositioned — so once the panel was open a click on the field or the chevron hit the backdrop and closed the panel instead of letting the operator keep typing. The field now carries .ip-field (position:relative, z-index 1042), stacking backdrop < panel < field. Pinned in bUnit by the class (the z-index itself is scoped CSS, verified visually). 2. OnParametersSet closes the panel on ANY lists change, not only when the selection disappeared: an open panel is showing the previous site's tree, which is wrong even when the selected instance happens to exist in both. The reference-equality contract on Areas/Instances is now stated on both parameters — pass a stable reference, replace it only when the set changed. 3. Tests: the chevron closes an open panel; two pickers mint distinct panel ids (and matching aria-controls); an unrelated parameter change with the SAME Instances reference leaves a half-typed filter and the open panel alone. Claude-Session: https://claude.ai/code/session_01NcMG6xXdsJbmD2wYAgkK29
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
@using ZB.MOM.WW.ScadaBridge.Commons.Entities.Instances
|
||||
|
||||
<div class="ip-wrap position-relative" data-test="@($"{DataTestPrefix}-picker")">
|
||||
<div class="input-group input-group-sm">
|
||||
@* ip-field lifts the field above the open panel's backdrop — see the .razor.css note. *@
|
||||
<div class="input-group input-group-sm ip-field">
|
||||
<input type="text" class="form-control" role="combobox" autocomplete="off"
|
||||
id="@_inputId" aria-autocomplete="list" aria-haspopup="tree"
|
||||
aria-expanded="@(_open ? "true" : "false")" aria-controls="@_panelId"
|
||||
|
||||
Reference in New Issue
Block a user