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

onBeforeRowHeaderDomAdd disables expandable tree styles?

Asked by ansel
1 year ago.

onBeforeRowHeaderDomAdd seems to disable expandable tree styles for nested resources.

I just wanted to confirm that is the case, and if onBeforeRowHeaderDomAdd is used, hiding and showing expandable resource row headers must me managed and styled explicitly.

Or is there some way to re-enable automatic styling?

Thanks.

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

In the onBeforeRowHeaderDomAdd event handler, you can specify the target that of the custom element using the args.target property. By default, it is set to "Cell". In this case, it will overwrite the whole cell content, including the expand/collapse icon.

The other option is "Text". This setting will will replace the text content of the row header cell. The text element is indented according to the current level and to make space for the expand/collapse icon.

Comment posted by ansel
1 year ago.

Ah, thanks! That is exactly the solution I was looking for!

I am using custom JSX for args.element but had args.target set to ‘Cell’ . Setting to ‘Text’ restores default styling!

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

Great, thanks for the update!

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