[AnalyticalTable]: Column filter popover closes on every selection with a popup-based custom Filter (e.g. MultiComboBox)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Empieza en packages/main/src/components/AnalyticalTable/defaults/Column/ColumnHeaderModal.tsx, donde el issue señala el controlador item-click y setOpen(false) incondicional. Comprueba en qué se diferencian los clics en la fila de filtros de las acciones de ordenar, agrupar y congelar, y reproduce el problema con un filtro personalizado basado en popup, como MultiComboBox. El trabajo estará hecho cuando seleccionar valores de filtro mantenga abierto el popover del encabezado, mientras que las acciones explícitas puedan seguir cerrándolo; el payload no menciona ningún archivo de prueba.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- TypeScript
- Estrellas
- 544
- Forks
- 113
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 34
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de UI5/webcomponents-react
-
[AnalyticalTable]: useF2CellEdit inserts "undefined" into grid-cell aria-labelPosiblemente ocupada @Lukas742 la tomó hace 5 días. AbiertoSAP SF
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
UI5/webcomponents-react#9171 ·
Los mantenedores suelen responder en 1 día
-
[ObjectPage]: Scrollbar jumps to the focused section once go out and come back to the browser tabPosiblemente ocupada @Lukas742 la tomó hace 11 días. AbiertoSAP SF
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
UI5/webcomponents-react#9161 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[ObjectPage]: page will twitch when the header height reaching the threshold of expansion and collapsePosiblemente ocupada @Lukas742 la tomó hace 8 días. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
UI5/webcomponents-react#9128 · 9 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
UI5/webcomponents-react#8529 ·
Los mantenedores suelen responder en 1 día
-
Design Pending SAP SF
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
UI5/webcomponents-react#8158 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de UI5/webcomponents-react
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
can1357/oh-my-pi#21349 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
[aw] CARE PR Reviewer: timed outAbiertoagentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ohcnetwork/care_fe#17474 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100