Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap.m.Select does not have 'press' or 'beforeOpen' event. #4115

Open
lauge21kj98 opened this issue Aug 26, 2024 · 7 comments
Open

sap.m.Select does not have 'press' or 'beforeOpen' event. #4115

lauge21kj98 opened this issue Aug 26, 2024 · 7 comments

Comments

@lauge21kj98
Copy link

Feature Request

OpenUI5 version:
1.127.0

https://sapui5.hana.ondemand.com/#/api/sap.m.Select

sap.m.Select does not have event 'press' or 'beforeOpen'.

If possible I would like to have a press or beforeOpen. This is customary for almost all you other controls, therefore I would greatly enjoy also having it on this control.

@elenastoyanovaa
Copy link
Contributor

Hello @lauge21kj98 ,

Thank you for sharing your enhancement proposal. I've created an internal incident DINC0249608. The status of the issue will be updated here in GitHub.

Regards,
Elena

@plamenivanov91
Copy link
Contributor

Hello @lauge21kj98 ,

You can attach your functionality to the public picker aggregation like this:

selectInstance.getPicker().attachBeforeOpen(function () {
    ...
})

You can read more about the before open event here:
https://openui5.hana.ondemand.com/api/sap.m.Popover#events/beforeOpen

Is this good enough solution for you ?

Regards,
Plamen Ivanov

@lauge21kj98
Copy link
Author

Yes thank you :)

@boghyon
Copy link
Contributor

boghyon commented Sep 3, 2024

picker is currently an internal aggregation

/**
* Internal aggregation to hold the inner picker popup.
*/
picker: {
type: "sap.ui.core.PopupInterface",
multiple: false,
visibility: "hidden"
},

@flovogt
Copy link
Member

flovogt commented Sep 4, 2024

Thanks for pointing this out @boghyon.

@plamenivanov91 the mentioned code will cause errors if the application is written in TypeScript. So making this aggregation public would be an possible option

@codeworrior
Copy link
Member

codeworrior commented Sep 4, 2024

Please further note that the beforeOpen even is not consistent between the two possible implementations of picker, which can either be a sap.m.Dialog (beforeOpen will have no parameters) or a sap.m.Popover (beforeOpen will have an openBy parameter).

@i556484 i556484 reopened this Sep 9, 2024
@plamenivanov91
Copy link
Contributor

Hello @lauge21kj98 ,

I have created internal backlog item BGSOFUIPIRIN-6661.

Once the feature is implemented this issue will be closed with link to the feature's change.

Regards,
Plamen Ivanov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants