Closed Michaelvilleneuve closed 2 years ago
This PR allows to easily retrieve the corresponding items when parsing the modified string. The very concrete use case is as follows:
@apply="addMention" addMention (item, key, replacedWith) { this.mentions.push({ user: item.data, replacedWith }) }
This way when using the string later I can work with it based on data like:
message: "Hello @Michael how are you?" mentions: [ { user: { id: 'xxx', firstName: 'Michael', lastName: 'Villeneuve' }, replacedWith: '@Michael' } ]
This PR allows to easily retrieve the corresponding items when parsing the modified string. The very concrete use case is as follows:
This way when using the string later I can work with it based on data like: