Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

0d4fb948

Compare
Choose a tag to compare
@adeira-github-bot adeira-github-bot released this 07 May 08:22
· 120 commits to master since this release
Hotels: SummaryRow should use dynamic width to truncate text

This fixes https://github.com/kiwicom/mobile/issues/1607

The issue was that using the `withDimension` HOC meant using the dimensions of the device. On Tablet view, the RoomSummary component is displayed only on half the screen width while SummaryRow assumed there is the full width of the device to render the text. This caused the row to go out of the container if the name of the hotel room was too long on Tablet.

The SummaryRow component was refactored to use two onLayout event listeners so that both the width of the container of the row and the width of the price tag are computed, and the max width for text can be deduced from that.