André Shevantes
André Shevantes

Reputation: 449

How to get SAPUI5 Explored styles?

I would like to implement a sap.ui.Table, as shown here in the SAPUI5 Explored app. As can be seen in the Explored page, this table allows for multi-selection of items with a checkbox on the left side. I downloaded the source code for this example, however, in my machine the visual style of the Table is different from the one in Explored (the checkboxes in the left side of the Table are missing). Do I need to add another stylesheet? Can someone help me on getting the exact same style as the one shown in the Explored example? I exposed the code that I used in this repo. Thanks in advance!

Upvotes: 0

Views: 601

Answers (1)

Jonathan.Brink
Jonathan.Brink

Reputation: 25373

the checkboxes in the left side of the Table are missing

Those checkboxes are for selection can be controlled using sap.ui.table.Table's selectionMode property.

There is an ENUM to define the various selection modes:

  • MultiToggle - Select multiple rows at a time (toggle behavior).
  • Multi - Select multiple rows at a time.
  • Single - Select one row at a time.
  • None - No rows can be selected.

So, if you want those checkboxes to appear and behave in your Table as they do in the Explored sample use a MultiToggle selectionMode.

If there are other styles that you are seeing in the demokit that are not showing up in your app they could be coming from Explored's own styling. You can look through those here.

Upvotes: 1

Related Questions