Skip to content

Add a forwardRef to wp.blockEditor.PlainText#14866

Merged
jorgefilipecosta merged 2 commits intomasterfrom
add/forward-ref-to-plain-text
Apr 9, 2019
Merged

Add a forwardRef to wp.blockEditor.PlainText#14866
jorgefilipecosta merged 2 commits intomasterfrom
add/forward-ref-to-plain-text

Conversation

@jorgefilipecosta
Copy link
Copy Markdown
Member

Description

This is a simple change; it allows users of wp.blockEditor.PlainText to pass a reference to the component.
A reference may be useful for users, e.g., to manage the focus, in #14856 we use this functionality to focus a plain text field programmatically.

How has this been tested?

Verify the test cases pass.
In #14856 verify that for now, also contains the forwardRef add a menu item open the menu item menu and verify the edit label works.

Copy link
Copy Markdown
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

It looks good. It would be nice if CHANGELOG entry was more detailed.

@gziolo gziolo added [Package] Components /packages/components [Type] Enhancement A suggestion for improvement. [Package] Block editor /packages/block-editor [Feature] UI Components Impacts or related to the UI component system and removed [Package] Components /packages/components labels Apr 9, 2019
Co-Authored-By: jorgefilipecosta <jorge.costa@developer.pt>
@jorgefilipecosta jorgefilipecosta merged commit 2b2fc18 into master Apr 9, 2019
@jorgefilipecosta jorgefilipecosta deleted the add/forward-ref-to-plain-text branch April 9, 2019 10:49
@youknowriad youknowriad added this to the 5.5 (Gutenberg) milestone Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] UI Components Impacts or related to the UI component system [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants