Skip to Content
0

SAPUI5: Drag and Drop, avoiding empty table

Apr 19, 2017 at 09:47 AM

48

avatar image

Hi,
I'm trying to use drag and drop between two tables. It works fine until i remove the last element from one table to the second one.

The height of <tbody> becomes 0. So I can't drop any items back to the table 1.

I already tried to set the <tbody> - min-height up to 80px but it doesn't change anything.

Further informations:
- using sap.m.table

code-snippet:

  var table = new sap.m.Table("tableGrp" + id,{});
  table.setShowNoData(false);
  table.setModel(this.model);

 var column1 = new sap.m.Column("colGrp1_" + id, { width: "15px" });
 table.addColumn(column1);
 var column2 = new sap.m.Column("colGrp2_" + id, { width: "75px"});
 table.addColumn(column2);


var colItem = new sap.m.ColumnListItem("colItems_" + id, {
type: "Active", 
testpos: "{position}" });

colItem.addStyleClass("midTable");

                
var questionIdentifier = new sap.m.ObjectIdentifier("qIdentifier_" + id, 
{
        title: "{name}",
        text: "{descr}"
});
colItem.addCell(questionIdentifier);
var typeText = new sap.m.Text("typeText2_" + id, { text: "{typename}" });
colItem.addCell(typeText);
(<any>table).bindItems(groupTemp.getModelPath(), colItem);

css code-snippet:

table
{
    min-height: 100px;
}
tbody
{
   min-height: 80px;
}

If i missed any important information, i will add it.

Does anybody know a solution to avoid getting an empty <tbody>?

Thank you very much in advance for your answer,
Jan

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers