Skip to content

feat(ui5-input-table-suggest): introduce new InputTableSuggest component#13678

Open
ndeshev wants to merge 27 commits into
mainfrom
input-tabular-suggestions-alt
Open

feat(ui5-input-table-suggest): introduce new InputTableSuggest component#13678
ndeshev wants to merge 27 commits into
mainfrom
input-tabular-suggestions-alt

Conversation

@ndeshev

@ndeshev ndeshev commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

JIRA: BGSOFUIRILA-4203

Related to #13666

Summary

Introduces ui5-input-table-suggest, a new experimental input component that displays suggestions in a tabular format with
multiple columns. This is the UI5 Web Components equivalent of OpenUI5's sap.m.Input with tabular suggestions.

Key Features

  • Multi-column suggestions - Display rich suggestion data in a table format via suggestionColumns (headers) and
    suggestionRows (data) slots
  • Text highlighting - Automatically highlights matching text in suggestion cells based on user input
  • Typeahead/Autocomplete - Matches against the first column of suggestion rows
  • Keyboard navigation - Full arrow key navigation with [Up]/[Down] to navigate rows, [Enter] to select, [Escape] to
    close
  • Responsive popin mode - Columns automatically collapse on smaller screens using Table's built-in popin behavior
  • Value state support - Supports all input value states (Negative, Critical, Positive, Information)
  • Screen reader support - Announces row position and column values during keyboard navigation
  • Mobile support - Full-screen popover experience on phones with dedicated OK/Cancel buttons

Usage

<ui5-input-table-suggest placeholder="Search..." show-suggestions>
    <ui5-table-header-cell slot="suggestionColumns" width="120px">Product ID</ui5-table-header-cell>
    <ui5-table-header-cell slot="suggestionColumns" width="200px">Name</ui5-table-header-cell>

    <ui5-table-row slot="suggestionRows">
        <ui5-table-cell>PRD-001</ui5-table-cell>
        <ui5-table-cell>Laptop Pro 15</ui5-table-cell>
    </ui5-table-row>
</ui5-input-table-suggest>


API

Slots

┌───────────────────┬─────────────────────────────────────┐
│       Name        │             Description             │
├───────────────────┼─────────────────────────────────────┤
│ suggestionColumns │ Table header cells defining columns │
├───────────────────┼─────────────────────────────────────┤
│ suggestionRows    │ Table rows with cell children       │
└───────────────────┴─────────────────────────────────────┘

Events

┌──────────────────┬───────────────────────────────┐
│       Name       │          Description          │
├──────────────────┼───────────────────────────────┤
│ selection-change │ Fired when a row is selected  │
├──────────────────┼───────────────────────────────┤
│ change           │ Fired when a row is confirmed │
└──────────────────┴───────────────────────────────┘
Architecture

- Extends Input component and reuses its template infrastructure
- Leverages existing Table, TableRow, TableCell, and TableHeaderCell components for rendering
- Custom filtering is application-controlled

ndeshev added 2 commits June 10, 2026 08:46
This POC uses ui5-table rendering instead of a native one

JIRA: BGSOFUIRILA-4203

related to #13666
@ndeshev
ndeshev temporarily deployed to netlify-preview June 11, 2026 08:10 — with GitHub Actions Inactive
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

major refactoring and improvements, added tests
@ndeshev
ndeshev temporarily deployed to netlify-preview July 8, 2026 14:12 — with GitHub Actions Inactive
minor fixes, value state functionality implementation
@ndeshev
ndeshev temporarily deployed to netlify-preview July 10, 2026 14:22 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 13, 2026 07:19 — with GitHub Actions Inactive
@ndeshev ndeshev changed the title feat(ui5-tabular-input): introduce new tabular suggestions input (wip) feat(ui5-tabular-input): introduce new tabular suggestions input Jul 13, 2026
@ndeshev
ndeshev marked this pull request as ready for review July 13, 2026 07:20
@ndeshev
ndeshev temporarily deployed to netlify-preview July 14, 2026 05:37 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 14, 2026 06:15 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 14, 2026 11:56 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 15, 2026 12:42 — with GitHub Actions Inactive
@nikoletavnv
nikoletavnv self-requested a review July 16, 2026 09:19
@nikoletavnv

Copy link
Copy Markdown
Contributor

The input border disappears once the focus goes to table row but the mouse hovers the input field

image

@nikoletavnv

Copy link
Copy Markdown
Contributor

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.
At the moment in this PR - only the selected value is announced without extra columns information

Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/TabularInputPopoverTemplate.tsx Outdated
Comment thread packages/main/src/InputTableSuggestPopoverTemplate.tsx
Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/src/TabularInput.ts Outdated
{processedRow.cells.map((cell, cellIndex) => (
<TableCell
key={`cell-${rowIndex}-${cellIndex}`}
dangerouslySetInnerHTML={{ __html: cell.highlightedMarkup }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ndeshev ndeshev Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nikoletavnv

Copy link
Copy Markdown
Contributor

Highlighting of the input text is trimming spaces. The original text in the second column is "Widget Alpha" but when bolded it is "WidgetAlpha":

image

Comment thread packages/main/src/TabularInput.ts Outdated
Comment thread packages/main/test/pages/InputTableSuggest.html
id="scrollSearch"
placeholder="Search with scroll..."
show-suggestions
overflow-mode="Scroll"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When overflow-mode="Scroll" on mobile devices there is horizontal scroll in the table which I don't think is by spec

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/main/test/pages/TabularInput.html Outdated
</div>

<!-- Example 6: Value States -->
<div class="section">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ndeshev ndeshev Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ndeshev

ndeshev commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

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. At the moment in this PR - only the selected value is announced without extra columns information

Fixed.

@ndeshev
ndeshev temporarily deployed to netlify-preview July 21, 2026 11:08 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 21, 2026 11:46 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 21, 2026 11:46 — with GitHub Actions Inactive
@nikoletavnv

nikoletavnv commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
  1. There is a shadow in the input when the focus goes to a table row.
image
  1. Also, hovering on the input now displays a border around the input but it is a wrong color - it should be blue
image
  1. When table is rendered in the popover, the table header top border and last row bottom border are applied next to the popover border and the top and bottom popover border looks thicker
image

ndeshev added 2 commits July 21, 2026 17:35
adjust old samples, add new ones, make overflowMode private property, fix the styling comments from the code review
@ndeshev
ndeshev temporarily deployed to netlify-preview July 21, 2026 14:47 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 21, 2026 14:47 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 21, 2026 15:03 — with GitHub Actions Inactive
@ndeshev

ndeshev commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author
  1. There is a shadow in the input when the focus goes to a table row.
  1. Also, hovering on the input now displays a border around the input but it is a wrong color - it should be blue
  1. When table is rendered in the popover, the table header top border and last row bottom border are applied next to the popover border and the top and bottom popover border looks thicker

Fixed

nikoletavnv
nikoletavnv previously approved these changes Jul 23, 2026
@ndeshev
ndeshev temporarily deployed to netlify-preview July 23, 2026 13:04 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

👋 Heads-up: dev close is in effect

Thanks for the contribution! This repository is currently in dev close ahead of release 2.25 (scheduled 2026-07-29, UTC). See the release schedule for the full timeline.

This PR appears to introduce public-API changes (detected by diffing the Custom Elements Manifest against the latest published version on npm):

@ui5/webcomponents

  • ➕ added interface: ITabularSuggestionRow
  • ➕ added element: TabularInput
  • ➕ added property: accessibleDescription
  • ➕ added property: accessibleDescriptionRef
  • ➕ added property: accessibleName
  • ➕ added property: accessibleNameRef
  • ➕ added property: disabled
  • ➕ added property: filter
  • ➕ added property: maxlength
  • ➕ added property: name
  • ➕ added property: noTypeahead
  • ➕ added property: open
  • ➕ added property: placeholder
  • ➕ added property: readonly
  • ➕ added property: required
  • ➕ added property: showClearIcon
  • ➕ added property: showSuggestions
  • ➕ added property: type
  • ➕ added property: value
  • ➕ added property: valueState
  • ➕ added event: change
  • ➕ added event: close
  • ➕ added event: input
  • ➕ added event: open
  • ➕ added event: select
  • ➕ added event: selection-change
  • ➕ added slot: default
  • ➕ added slot: icon
  • ➕ added slot: suggestionColumns
  • ➕ added slot: suggestionRows
  • ➕ added slot: valueStateMessage
  • ➕ added CSS part: clear-icon
  • ➕ added CSS part: input
  • ➕ added CSS part: root
  • ➕ added attribute: accessible-description
  • ➕ added attribute: accessible-description-ref
  • ➕ added attribute: accessible-name
  • ➕ added attribute: accessible-name-ref
  • ➕ added attribute: disabled
  • ➕ added attribute: filter
  • ➕ added attribute: maxlength
  • ➕ added attribute: name
  • ➕ added attribute: no-typeahead
  • ➕ added attribute: open
  • ➕ added attribute: placeholder
  • ➕ added attribute: readonly
  • ➕ added attribute: required
  • ➕ added attribute: show-clear-icon
  • ➕ added attribute: show-suggestions
  • ➕ added attribute: type
  • ➕ added attribute: value
  • ➕ added attribute: value-state

Could you please hold off on merging into main until the release ships? Public-API changes are best landed in the next dev cycle so they don't slip into the release at the last minute. Once the release is out, this PR is good to go.

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.

💬 False positive? If you believe this PR doesn't actually change the public API (e.g. only internal refactoring, or an entry the detector mis-attributed), please reply on this thread — your feedback helps us improve the detection during this trial run.

Posted automatically by the Dev Close Notice workflow.

@ndeshev ndeshev changed the title feat(ui5-tabular-input): introduce new tabular suggestions input feat(ui5-input-table-suggest): introduce new InputTableSuggest component Jul 23, 2026
@ndeshev
ndeshev force-pushed the input-tabular-suggestions-alt branch from 372efd9 to 4f793f9 Compare July 23, 2026 15:17
@ndeshev
ndeshev temporarily deployed to netlify-preview July 23, 2026 15:17 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 23, 2026 15:18 — with GitHub Actions Inactive
@ndeshev
ndeshev force-pushed the input-tabular-suggestions-alt branch from 0859076 to f30f39e Compare July 23, 2026 15:26
@ndeshev
ndeshev temporarily deployed to netlify-preview July 23, 2026 15:26 — with GitHub Actions Inactive
@ndeshev
ndeshev temporarily deployed to netlify-preview July 23, 2026 15:28 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants