SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.51k stars 263 forks source link

Input Suggestions are not working correctly when using custom elements scoping suffix #7583

Closed schempil closed 1 year ago

schempil commented 1 year ago

Bug Description

Showing suggestions for an input is not working correctly and without errors after setting an custom elements scoping suffix in our application.

Affected Component

Input, SuggestionItem

Expected Behaviour

I expect that also while using a custom elements scoping suffix the suggestion items are still working as before.

Isolated Example

https://codesandbox.io/s/ui5-webcomponents-forked-g94wkj?file=/src/index.js

Steps to Reproduce

  1. Check the error in the provided sandbox example

Log Output, Stack Trace or Screenshots

image

Priority

High

UI5 Web Components Version

1.17.0

Browser

Chrome

Operating System

Mac OS

Additional Context

No response

Organization

SAP SE

Declaration

Lukas742 commented 1 year ago

Hi @schempil

for reference I also include my findings I shared in Slack here as well:

The order of the side-effect imports is causing this issue. You have to make sure that the features/InputSuggestions import is executed before the component import:

https://codesandbox.io/s/ui5-webcomponents-forked-nqy5c7?file=/src/index.js

schempil commented 1 year ago

Thanks @Lukas742! This helped.

Does it make sense to document that in the docs? Or did I just miss the part? 😄

NHristov-sap commented 1 year ago

Hello @SAP/ui5-webcomponents-topic-rl,

Please check and evaluate the proposal for documentation update on this topic/issue.

Best Regards, Nikolay Hristov

elenastoyanovaa commented 1 year ago

Hello @schempil ,

Actually this is already documented here: https://sap.github.io/ui5-webcomponents/playground/?path=/docs/docs-getting-started-using-features--docs for the framework-level features, but it is the same for all of them in my opinion. The code related to suggestions is checking if the feature is registered in order to use it.

Kind Regards, Elena