feat(ui5-input-table-suggest): introduce new InputTableSuggest component#13678
feat(ui5-input-table-suggest): introduce new InputTableSuggest component#13678ndeshev wants to merge 27 commits into
Conversation
…onent (draft) poc
This POC uses ui5-table rendering instead of a native one JIRA: BGSOFUIRILA-4203 related to #13666
|
🚀 Deployed on https://pr-13678--ui5-webcomponents-preview.netlify.app |
major refactoring and improvements, added tests
minor fixes, value state functionality implementation
add playground samples
fix table scrolling
fix showSuggestions property behavior
|
Announcing the selected row differs from OpenUI5 table suggestions. In the other application when going through the items, first the number of the row is announced with some other information. After the value column is announced, the rest of the columns and their values for the selected row are also announced. |
| {processedRow.cells.map((cell, cellIndex) => ( | ||
| <TableCell | ||
| key={`cell-${rowIndex}-${cellIndex}`} | ||
| dangerouslySetInnerHTML={{ __html: cell.highlightedMarkup }} |
There was a problem hiding this comment.
I can set a script for the table cell like this: <ui5-table-cell><script>alert("aaaaaaaa");</script></ui5-table-cell> and the script will be executed on page load. Also I am not able to select this row from the suggestions by pressing "Enter" - nothing happens.
There was a problem hiding this comment.
This is NOT a vulnerability in the component by itself. The script executes because it's part of the original declarative HTML in the document. When the browser parses <ui5-table-cell><script>alert("XSS");</script></ui5-table-cell> the <script> tag is executed immediately by the browser's HTML parser - this happens before any JavaScript framework code runs. This is standard browser behavior.
If an application allows users to input arbitrary HTML into suggestion rows (e.g., from a database or API), it should sanitize that data before inserting it into the DOM, not rely on the highlighting mechanism or front-end sanitization of any kind. The script executes at HTML parse time, before any sanitization in JavaScript can run.
| id="scrollSearch" | ||
| placeholder="Search with scroll..." | ||
| show-suggestions | ||
| overflow-mode="Scroll" |
There was a problem hiding this comment.
When overflow-mode="Scroll" on mobile devices there is horizontal scroll in the table which I don't think is by spec
There was a problem hiding this comment.
This is the idea of the overflowMode="Scroll" property of the ui5-table
As for our specs - we do not have it specified to not have a horizontal scroll.
| </div> | ||
|
|
||
| <!-- Example 6: Value States --> | ||
| <div class="section"> |
There was a problem hiding this comment.
The value state samples are broken - no table suggestions are shown. If I set a value state to the first table input sample - it works.
Also pressing Ctrl + Alt + F8 focuses an ui5-link in the value state message popup, but once the link is focused - pressing TAB does nothing and the focus remains trapped in the value state popup. For value state header it works
There was a problem hiding this comment.
It is not broken, there are no examples with value state and showSuggestions property set to true, I will add such.
I fixed the link tab navigation.
Fixed. |
fix value state links tab navigation
adjust old samples, add new ones, make overflowMode private property, fix the styling comments from the code review
…P/ui5-webcomponents into input-tabular-suggestions-alt
remove redundant tests
Fixed |
👋 Heads-up: dev close is in effectThanks for the contribution! This repository is currently in dev close ahead of release This PR appears to introduce public-API changes (detected by diffing the Custom Elements Manifest against the latest published version on npm):
Could you please hold off on merging into If this change must ship in the current release, please request a review from one or two members of @UI5/ui5-team-webc so the team can sign off explicitly.
Posted automatically by the Dev Close Notice workflow. |
rename the component
372efd9 to
4f793f9
Compare
fix cypress test file name
0859076 to
f30f39e
Compare





JIRA: BGSOFUIRILA-4203
Related to #13666
Summary
Introduces
ui5-input-table-suggest, a new experimental input component that displays suggestions in a tabular format withmultiple columns. This is the UI5 Web Components equivalent of OpenUI5's
sap.m.Inputwith tabular suggestions.Key Features
suggestionColumns(headers) andsuggestionRows(data) slotsclose
Usage