search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Resize a Bumper Row

Asked by RPM
1 year ago.

Another question…

Because the table is striped, and because it has collapsable children, I have found the need to insert a “bumper row” so that things look good weather collapsed or expanded. I have code where if there is an even number of rooms for a room type, this bumper-row is added, and if there is an odd number of rooms it is not.

…is there a way to decrease the height of only these bumper rows? I have tried and failed.

Answer posted by Dan Letecky [DayPilot]
1 year ago.

The row height is calculated from the eventHeight property. For an empty row, it is equal to 1*eventHeight.

You can set custom eventHeight for each row like this:

const resources = [
  { name: "Group1", id:"G1", eventHeight: 20}
];

dp.update({resources});
Comment posted by RPM
1 year ago.

Adding eventHeight to my child resources API did not work, still the same height (default hight):

(tried with and without quotes around the “3” either way the quotes don’t show in the JSON [shown below])

I use eventHeight on all the RoomTypes (parents) but it seems to do nothing on the RoomNum (children), so I just set the default height where I want them (but I want _Padding rows to be tiny)

API JSON: Normal Room, Padding Row, Next RoomType, Normal Room

When I tried to do exactly as you had posted:

It just removed all my resources (as I’m sure you guessed)…

…so not a good way to update a rows height by ID, you would have to recreate all resources.

I guess the issue is just that eventHeight doesn’t seem to work on children.

(maybe something you have already fixed long ago, and I just need to update?)

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.