[AnalyticalTable]: Column filter popover closes on every selection with a popup-based custom Filter (e.g. MultiComboBox)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
issueで item-click ハンドラーと無条件の setOpen(false) が指摘されている packages/main/src/components/AnalyticalTable/defaults/Column/ColumnHeaderModal.tsx から始めてください。フィルター行のクリックが、ソート、グループ化、固定の各アクションとどう異なるかを確認し、MultiComboBox のようなカスタムのポップアップベースのフィルターで再現してください。フィルター値を選択してもヘッダーのポップオーバーが開いたままで、明示的なアクションでは引き続き閉じられる状態が完了条件です。payloadにはテストファイルの指定がありません。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When a column uses a custom Filter that is a popup-based control (MultiComboBox, Select, ComboBox, DatePicker, …), the column-header popover closes on every selection. For a MultiComboBox this makes multi-selection practically unusable: the popover disappears after each picked item, so the user has to re-open it for every value.
Typing into the control does not close the popover — only selecting a value from its dropdown does.
Reproduction steps
- Render an
AnalyticalTablewithfilterableand a column whoseFilterrender-prop returns aMultiComboBox(withMultiComboBoxItemchildren) and callscolumn.setFilter(...)inonSelectionChange. - Open the column header → Filter.
- Open the
MultiComboBoxdropdown and select an item. - The column-header popover closes immediately.
Expected Behaviour
Selecting a value in a custom filter control should not close the column-header popover — at least not for multi-value controls. The popover should stay open so the user can pick multiple values, and close only on Escape, an outside click, or an explicit sort/group/freeze action.
Root cause
The popover is not closed by the ui5-popover's own light-dismiss — it is unmounted by React. In packages/main/src/components/AnalyticalTable/defaults/Column/ColumnHeaderModal.tsx, the List's item-click handler ends with an unconditional setOpen(false):
const handleModalItemClick = (e) => {
// ...sort / group / freeze branches, each keyed off e.detail.item.dataset...
setOpen(false); // ColumnHeaderModal.tsx:130 — runs for the filter row too
};
setOpen is the header cell's setPopoverOpen. The custom filter is rendered inside a clickable ListItemCustom (type="Active"), so selecting a value in the filter control surfaces an item-click on the filter row (which carries no data-sort / data-modal-item). The switch has no matching case, so execution falls through to the unconditional setOpen(false), which flips popoverOpen to false and unmounts the popover.
Because it is a React unmount rather than a native popover close, there is no before-close/close event — so onBeforeClose / modal cannot be used to prevent it.
Suggested fix
Skip setOpen(false) in handleModalItemClick when the clicked row is the filter row (no data-sort / data-modal-item), or render the filter's ListItemCustom as non-interactive. Either removes the need for any consumer workaround and fixes it for all popup-based custom filters.
Consumer workaround (until fixed)
Cancel the item-click for the filter row in the capture phase, using the popoverRef from the Filter render-prop:
const DepartmentFilter = ({ column, popoverRef }: ColumnFilterProps) => {
useEffect(() => {
const popover = popoverRef.current;
if (!popover) {
return;
}
const keepOpenOnFilterClick = (e: Event) => {
const item = (e as CustomEvent<{ item?: HTMLElement }>).detail?.item;
// filter row has no data-sort / data-modal-item marker
if (item && !item.dataset.sort && !item.dataset.modalItem) {
e.stopImmediatePropagation();
}
};
popover.addEventListener('item-click', keepOpenOnFilterClick, true);
return () => popover.removeEventListener('item-click', keepOpenOnFilterClick, true);
}, [popoverRef]);
// ...MultiComboBox with onSelectionChange -> column.setFilter(...)
};
Environment Info
- UI5 Web Components for React Version: 2.29.0
- UI5 Web Components Version: 2.29.0
- Browser: Chrome
- Operating System: macOS
Additional Context
Not specific to MultiComboBox — the same code path closes the popover for any popup-based custom filter (Select, ComboBox, DatePicker, …). It is simply most disruptive for MultiComboBox, where selecting multiple values in a row is the intended interaction. A plain text Input filter is unaffected (it has no dropdown to select from, so no item-click is fired).
- 主要言語
- TypeScript
- スター
- 544
- フォーク
- 113
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 34
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
UI5/webcomponents-react のほかの issue
-
[AnalyticalTable]: useF2CellEdit inserts "undefined" into grid-cell aria-label対応中かも @Lukas742 が 5 日前に担当しました。 オープンSAP SF
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
UI5/webcomponents-react#9171 ·
メンテナーはふだん 1 日以内に返信
-
[ObjectPage]: Scrollbar jumps to the focused section once go out and come back to the browser tab対応中かも @Lukas742 が 11 日前に担当しました。 オープンSAP SF
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
UI5/webcomponents-react#9161 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[ObjectPage]: page will twitch when the header height reaching the threshold of expansion and collapse対応中かも @Lukas742 が 8 日前に担当しました。 オープン
難易度 3/5 半日 初心者へのやさしさ 55/100
UI5/webcomponents-react#9128 · コメント 9 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
UI5/webcomponents-react#8529 ·
メンテナーはふだん 1 日以内に返信
-
Design Pending SAP SF
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
UI5/webcomponents-react#8158 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
UI5/webcomponents-react の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
can1357/oh-my-pi#21349 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ohcnetwork/care_fe#17474 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100