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.5k stars 260 forks source link

[SAP][StepInput]: Need to restrict value change on scroll behaviour #9626

Open thisisjasmeet opened 1 month ago

thisisjasmeet commented 1 month ago

Describe the bug

We are using stepinput inside analytical table.

Table is scrollable too

problem is when user focuses on step input and then tries to scroll table value of step input also changes

We want to restrict this behaviour but currently there is no way to do this.

https://github.com/user-attachments/assets/2056faa5-e3d5-4868-a5b6-b07c38dda9d0

ISSUE 2:-

Apart from this there is another issue

there is onChange event but no onInput event due to this value will only change when i click outside stepinput

consider a scenario when i need to show a message strip when value exceeds a certain limit this is not possible now user will only get to know once he clicks outside

If user scrolls or enters value manually then change only happens when he clicks outside

Isolated Example

No response

Reproduction steps

(https://sap.github.io/ui5-webcomponents-react/?path=/docs/inputs-stepinput--docs)

latest version of Step input doesnt provide a way to restrict value change on scroll

Expected Behaviour

there should be a prop to restrict this behaviour

Screenshots or Videos

No response

UI5 Web Components for React Version

1.29.5

UI5 Web Components Version

1.29.5

Browser

Chrome

Operating System

macos

Additional Context

this is internal to sap so please fix this ASAP or suggest a workaround our feature dependents on it

Relevant log output

No response

Organization

SAP

Declaration

MarcusNotheis commented 1 month ago

Hi @thisisjasmeet,

thanks for reaching out! I need to forward this bug report to the UI5 Web Components repository as the affected component is developed in that repository, and I think this is rather a feature request than a bug report.


Hi colleagues,

I think this is a feature request for the StepInput (and maybe even for the Input if type=Number is used): Currently, there is no way to prevent a value change if the StepInput is rendered in a scroll container and the user scrolls by accident in the hover area of the StepInput: You can check this sandbox for reference: https://stackblitz.com/edit/github-wnffpw?file=src%2FApp.tsx

When using the native input, the value change on scrolling with the mouse wheel can be prevent.

ivoplashkov commented 1 month ago

Hello colleagues,

As replied by @MarcusNotheis "Currently, there is no way to prevent a value change if the StepInput is rendered in a scroll container and the user scrolls by accident in the hover area of the StepInput". I could reproduce the issue with ArrowDown/ArrowUp as well.

Could you please have a look?

Best regards, Ivaylo

thisisjasmeet commented 1 month ago

@MarcusNotheis @ivoplashkov Apart from this there is another issue

there is onChange event but no onInput event due to this value will only change when i click outside stepinput

consider a scenario when i need to show a message strip when value exceeds a certain limit this is not possible now user will only get to know once he clicks outside

If user scrolls or enters value manually then change only happens when he clicks outside

Lukas742 commented 1 month ago

Hi @thisisjasmeet

there's already a feature request regarding the input event. You can find it here: https://github.com/SAP/ui5-webcomponents/issues/5177