sap.m.Table event selectionChange is not called when method removeSelections is executed
OpenUI5 version: 1.60.1
Browser/version (+device/version): Chrome
Any other tested browsers/devices(OK/FAIL): Firefox: FAIL
URL (minimal example if possible): https://jsbin.com/muzopuv/edit?html,output
Steps to reproduce the problem:
- Run sample with JS
- Select with check first row of table - alert appears (table selectionChange event)
- Press button "clear selection" (executes table method removeSelections) - alert do not appear
What is the expected result? alert appears in both cases: selectionChange is called when removeSelections is executed
What happens instead? alert do not appears when removeSelections is executed: selectionChange is not called
Hello @endrx , Thank you for sharing this finding. I've created an internal incident 1870497632. The status of the issue will be updated here in GitHub. Regards,
Isn't this in line with UI5s guideline for change events?
Very early in the development of UI5 we had to decide whether change events should be fired only for immediate user interaction (keyboard input, pointer events, ...) or also for changes applied via API calls (setValue, ...).
Both approaches are reasonable, but we decided for the first one.
There are a few exceptions from this (design bugs), but in general this is how change events in UI5 are meant to work.
this is also similar with (most of the) DOM APIs; setting the value property of the HTMLInputElement does not fire the input event. The caller of the API should know what is changed.