Skip to content

react-core(fix): Use resizeObserver to trigger trimLeft calculation - #6529

Merged
dlabrecq merged 1 commit into
patternfly:mainfrom
dlabrecq:4710-resize-observer-textinput
Nov 1, 2021
Merged

dlabrecq merged 1 commit into
patternfly:mainfrom
dlabrecq:4710-resize-observer-textinput

Conversation

@dlabrecq

@dlabrecq dlabrecq commented Oct 29, 2021 •

Copy link
Copy Markdown
Member

If the TextInput has the isLeftTruncated prop set to true, other page elements push on the input and change the dimensions. In this scenario, the recalculation for trimming the text won’t always happen.

before

This fix uses the ResizeObserver from #6528

Fixes #4710

After

after.mov

@patternfly-build

patternfly-build commented Oct 29, 2021 •

Copy link
Copy Markdown
Collaborator

@ddonahue007 ddonahue007 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dlabrecq
dlabrecq force-pushed the 4710-resize-observer-textinput branch 4 times, most recently from d12b4ac to 0a6750e Compare October 29, 2021 18:00
@dlabrecq
dlabrecq force-pushed the 4710-resize-observer-textinput branch from 0a6750e to fdf77f2 Compare October 29, 2021 18:04
@dlabrecq
dlabrecq merged commit 31d873a into patternfly:main Nov 1, 2021
@dlabrecq
dlabrecq deleted the 4710-resize-observer-textinput branch February 7, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextInput + isLeftTruncated prop: Use resizeObserver to trigger trimLeft calculation

4 participants