Add key
prop to RTE decorated entities (Pills and links)
This will cause a re-render when the URL of the pill/link changes. fixes vector-im/riot-web#4718
This commit is contained in:
parent
ff0741d435
commit
9e71ba26c4
1 changed files with 2 additions and 2 deletions
|
@ -190,11 +190,11 @@ export default class MessageComposerInput extends React.Component {
|
||||||
const Pill = sdk.getComponent('elements.Pill');
|
const Pill = sdk.getComponent('elements.Pill');
|
||||||
const {url} = Entity.get(entityProps.entityKey).getData();
|
const {url} = Entity.get(entityProps.entityKey).getData();
|
||||||
if (Pill.isPillUrl(url)) {
|
if (Pill.isPillUrl(url)) {
|
||||||
return <Pill url={url} room={this.props.room} offsetKey={entityProps.offsetKey}/>;
|
return <Pill url={url} key={url} room={this.props.room} offsetKey={entityProps.offsetKey}/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a href={url} data-offset-key={entityProps.offsetKey}>
|
<a href={url} key={url} data-offset-key={entityProps.offsetKey}>
|
||||||
{entityProps.children}
|
{entityProps.children}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue