Skip to content

Commit

Permalink
Remove __unstableIsSelected
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Aug 7, 2019
1 parent 34cdf95 commit 1f16b2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ function RichTextWrapper( {
onEnter={ onEnter }
onDelete={ onDelete }
onPaste={ onPaste }
__unstableIsSelected={ originalIsSelected }
__unstableInputRule={ inputRule }
__unstableMultilineTag={ multilineTag }
__unstableIsCaretWithinFormattedText={ isCaretWithinFormattedText }
Expand Down
6 changes: 3 additions & 3 deletions packages/rich-text/src/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,6 @@ class RichText extends Component {
selectionStart,
selectionEnd,
placeholder,
__unstableIsSelected: isSelected,
} = this.props;

// Check if the content changed.
Expand All @@ -754,7 +753,7 @@ class RichText extends Component {

// Check if the selection changed.
shouldReapply = shouldReapply || (
isSelected && ! prevProps.isSelected && (
selectionStart && ! prevProps.selectionStart && (
this.record.start !== selectionStart ||
this.record.end !== selectionEnd
)
Expand Down Expand Up @@ -920,11 +919,12 @@ class RichText extends Component {

render() {
const {
__unstableIsSelected: isSelected,
selectionStart,
children,
allowedFormats,
withoutInteractiveFormatting,
} = this.props;
const isSelected = selectionStart !== undefined;

return (
<>
Expand Down

0 comments on commit 1f16b2f

Please sign in to comment.