fix(Textbox): stops flash on inlineContent change
Description
It was noticed that the TextBox would flash when loading. This would occur when the TextBox contained content that were of type InlineContent and any property changed. This was due to the number of lines in the flex container potentially being more than the maxLines within the InlineContent. It would then calculate the height based on this wrong number and send it back to the TextBox and flash the wrong number of lines.
References
LUI-1435
Testing
- Check to make sure everything within both the
InlineContentstories andTextBoxstories renders as expected. - Specifically, make sure that when changing the
maxLinescontrol, it works as expected and that there is no flashing of the component.
Automation
Checklist
- [ ] all commented code has been removed
- [ ] any new console issues have been resolved
- [ ] code linter and formatter has been run
- [ ] test coverage meets repo requirements
- [ ] PR name matches the expected semantic-commit syntax
https://github.com/rdkcentral/Lightning-UI-Components/assets/32280146/f567b34a-2ce5-40f7-82a6-34c047d5a0da
I'm somewhat able to still see the flashing when I switch between wrapped and not wrapped, but I'm not sure how realistic this scenario would be for a user/ seems like this could be outside of the scope of the original problem you fixed.
@ctoddy
- regarding the component showing up cut off- I believe there is another ticket regarding that and it is not a result of this pr
- regarding the flash, ill look back into that