SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.24k forks source link

Proper TypeScript Type for TableSelectDialog$ConfirmEvent getParameter("selectedContexts") #4067

Closed mgerzabek closed 3 months ago

mgerzabek commented 3 months ago

OpenUI5 version: 1.123.0

Browser/version (+device/version): Chrome latest

Any other tested browsers/devices(OK/FAIL): Firefox Ok

URL (minimal example if possible): –

User/password (if required and possible - do not post any confidential information here): –

Steps to reproduce the problem:

  1. The documentation states that the return value for the method getParameter("selectedContexts") in a TableSelectDialog$ConfirmEvent is string
  2. In the sample you can see that in fact it's an array of some object
    var aContexts = oEvent.getParameter("selectedContexts");
    if (aContexts && aContexts.length) {
    MessageToast.show("You have chosen " + 
      aContexts.map(function (oContext) { return oContext.getObject().Name; }).join(", ")
    );
    }

[!NOTE] What is the expected result? Please correct documentation to reflect the correct result type and update type information so that TS Lint is not complaining.

TeodorTaushanov commented 3 months ago

Hello @mgerzabek,

Thank you for sharing this finding. I've created an internal incident DINC0182114. The status of the issue will be updated here in GitHub.

Regards, Teodor

TeodorTaushanov commented 3 months ago

This issue is fixed in the master branch.