[
https://issues.apache.org/jira/browse/NIFI-16222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18107579#comment-18107579
]
ASF subversion and git services commented on NIFI-16222:
--------------------------------------------------------
Commit 1c6794e9c7563523c5cfc36c4a3e8cfaef659f96 in nifi's branch
refs/heads/main from Rob Fellows
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=1c6794e9c75 ]
NIFI-16222 Improved searchable select keyboard navigation for grouped options
(#11561)
* NIFI-16222 Improved searchable select keyboard navigation for grouped options
Grouped, non-virtual option lists rendered a per-group option id, so the
active option id used for scrolling and Enter selection never resolved.
Tag the active option with a stable active id driven by reference identity
for grouped lists and by the active template index for ungrouped lists,
scroll and select through that id, and select through the MatSelect
MatOption instances so multi-select toggling and duplicate values across
groups resolve to the highlighted row.
Also disarm the pending value-change permission on Escape, on panel close,
and after an Enter that re-selects the already-selected option, so a
subsequent closed-panel arrow auto-selection is not accepted.
* address review feedback
> UI - Searchable select keyboard navigation broken when options are grouped
> --------------------------------------------------------------------------
>
> Key: NIFI-16222
> URL: https://issues.apache.org/jira/browse/NIFI-16222
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Rob Fellows
> Assignee: Rob Fellows
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> In the UI, the searchable select control supports grouping options (for
> example,
> connector property fields whose allowable values are organized into groups
> such
> as secrets by provider).
> When a searchable select is populated with grouped options, keyboard
> interaction
> is broken even though visual highlighting still moves:
> 1. Arrow Up / Arrow Down moves the highlighted option, but once the highlight
> leaves the currently visible portion of the list, the panel does not scroll
> to keep the highlighted option in view. The highlight continues to move
> off-screen.
> 2. Pressing Enter while an option is highlighted does not select that option.
> The same Enter behavior works for searchable selects that do not use
> groups.
> Ungrouped searchable selects (static allowable values without a group)
> continue
> to support keyboard navigation and Enter selection as expected.
> Steps to reproduce:
> 1. Open a connector configuration/property UI that presents a searchable
> select
> with grouped options (e.g. a secrets / credential-style property whose
> options
> are shown under group headers).
> 2. Open the dropdown and focus the search field.
> 3. Press Arrow Down repeatedly until the highlight moves past the bottom of
> the
> visible list.
> 4. Observe whether the list scrolls to follow the highlight.
> 5. With a lower/group option highlighted, press Enter.
> 6. Observe whether that option is selected and the panel closes
> (single-select).
> Expected:
> - Keyboard navigation keeps the highlighted option in view by scrolling the
> list.
> - Enter selects the currently highlighted option (same as ungrouped searchable
> selects and mouse click).
> Actual:
> - The highlight can move out of the visible area without the list scrolling.
> - Enter does not select the highlighted option when options are grouped.
> Notes:
> - Limited to (or primarily observed with) searchable selects that render
> grouped
> options.
> - Mouse selection of grouped options works.
> - Ungrouped searchable selects are not affected by this keyboard failure mode.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)