Use useView mode of PreviewElement for re-use search widget

Generating the preview from the model is much slower and not
required in this context.

Bug: T310318
Change-Id: I73ab222c268939eb542aaae8b529446eae45abc7
This commit is contained in:
Ed Sanders 2022-06-15 16:28:39 +01:00
parent 56da1e461b
commit cada626709

View file

@ -147,7 +147,8 @@ ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
n++;
var refModel = ve.dm.MWReferenceModel.static.newFromReferenceNode( refNode );
var view = new ve.ui.MWPreviewElement(
this.internalList.getItemNode( refModel.getListIndex() )
this.internalList.getItemNode( refModel.getListIndex() ),
{ useView: true }
);
var refGroup = refModel.getGroup();