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.ColumnListItem custom Detail icon #4028

Open
mathlizee opened this issue Apr 20, 2024 · 4 comments
Open

sap.m.ColumnListItem custom Detail icon #4028

mathlizee opened this issue Apr 20, 2024 · 4 comments

Comments

@mathlizee
Copy link

Hello!

It would be nice if the Detail icon of the sap.m.ColumnListItem control could be customizable rather than being hardcoded to use a pen icon.

My use case is that, for a certain amount of rows (not all) of a sap.m.Table, I would like to add an icon button at the end of the row that the user can press to display more information in a dialog about the chosen row. To achieve this behaviour, I can dynamically hide the Detail button for rows that do not have additional infos to show, but there's no easy way for me to set the Detail icon to an icon that better represent a "show more" action rather than a "edit" action.

I think this feature would had flexibility for other use cases of the Detail type of sap.m.ColumnListItem.

Thanks!
Math

@NHristov-sap
Copy link
Contributor

Hello @mathlizee ,

Your request is forwarded to the responsible team for evaluation.

Best Regards,
Nikolay Hristov
UI5 GitHub Dispatcher

@aborjinik
Copy link
Contributor

aborjinik commented Apr 22, 2024

Hello @mathlizee,

The type property of the ListItemBase comes with some semantics e.g. there are some custom accessibility descriptions like "is editable" and some keyboard interaction, e.g. Ctrl+E triggers detailPress event. So using the type="Edit" property of list items as a generic row action via different icon is semantically not correct.
The good news is we are considering a new "row actions" concept for the m/Table and I believe this will also fit to your requirement better. However for simple row actions you can already today consider to have a column on the right with a button cell template and bind the icon/visible property of the button accordingly. The getSource() method of the press event of Button will give you the button instance that is pressed and the getParent() call of the button instance should give you the list item instance that you need. Would that help?

Best regards,
Cahit

@simlin
Copy link
Contributor

simlin commented Apr 22, 2024

FIORITECHP1-23873

@mathlizee
Copy link
Author

@aborjinik

Thanks for your response! I ended up using the press event of the ColumnListItem to open a dialog instead.

Math

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

6 participants