openui5
openui5 copied to clipboard
sap.m.ColumnListItem custom Detail icon
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
Hello @mathlizee ,
Your request is forwarded to the responsible team for evaluation.
Best Regards, Nikolay Hristov UI5 GitHub Dispatcher
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
FIORITECHP1-23873
@aborjinik
Thanks for your response! I ended up using the press
event of the ColumnListItem
to open a dialog instead.
Math