Fix for row labels sometimes disappearing when double clicked in table report #20982
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Fixes #20894
This can take a bit of time to recreate, I used the event report and clicked repeatedly on the first label to expand and collapse it:

Eventually the label disappears:

The label is disappearing because the column width is being set to zero by the
resizeDataTable()
event, a minimum label size is passed togetLabelWidth()
but this method sometimes incorrectly calculates a zero width value from existing DOM elements. I suspect that this could be race condition between the row collapse and resize table events.This PR adds a check to the
getLabelWidth()
method to prevent zero values being returned and instead falls back to the passedminLabelWidth
value. After this change I was no longer able to recreate the issue, despite much clicking.Review