Attachment Thumbnails are missing in the Editor Widget loaded into Experience Builder

796
3
Jump to solution
07-02-2021 11:30 AM
SBerg_VHB
Occasional Contributor

Hi, it looks like the attachments widget now used by the editor widget will show thumbnails if the displayType property is set to 'preview'.  Any guidance on how to best set this in a 4.x widget for Experience Builder?  Perhaps using Editor::supportingWidgetDefaults?

Appreciate the help!

Sam_Berg_2-1625250452014.png

 

      if (this.myRef.current) {
        const newEditor = new Editor({
          view: jmv.view,
          container: this.myRef.current
        });

 

Sam_Berg_0-1625250246403.png

Sam_Berg_1-1625250296664.png

 

0 Kudos
1 Solution

Accepted Solutions
TianWen
Esri Contributor

Hi @SBerg_VHB  

Thanks for the post!

If I understand your question correctly, you would like to set the displayType property of the attachments widget used by the editor widget to "preview".

The editor widget in ExB dev samples is actually the component imported from the jsapi. According to the jsapi docs, the displayType property of the attachments widget is default as "list"

TianWen_0-1627267301819.png

and the editor component does not support override default properties of the attachments widget for now.

TianWen_1-1627267474142.png

So currently, if you want to "preview" those thumbnails, you can use the attachments widget separately instead of using the one embedded in the editor widget.

Hope this helps!

Thanks

- Tian

 

View solution in original post

0 Kudos
3 Replies
TianWen
Esri Contributor

Hi @SBerg_VHB  

Thanks for the post!

If I understand your question correctly, you would like to set the displayType property of the attachments widget used by the editor widget to "preview".

The editor widget in ExB dev samples is actually the component imported from the jsapi. According to the jsapi docs, the displayType property of the attachments widget is default as "list"

TianWen_0-1627267301819.png

and the editor component does not support override default properties of the attachments widget for now.

TianWen_1-1627267474142.png

So currently, if you want to "preview" those thumbnails, you can use the attachments widget separately instead of using the one embedded in the editor widget.

Hope this helps!

Thanks

- Tian

 

0 Kudos
SBerg_VHB
Occasional Contributor

Thank you @TianWen.  Would you happen to know of a sample or example showing the use of the attachment widget separately from the embedded editor widget within Experience Builder custom widgets?  I would really appreciate more information on that.

Regards, Sam

0 Kudos
TianWen
Esri Contributor

We don't have any specific samples in ExB for the attachment widget yet, but you could refer to this page (https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html) for detailed information (interfaces and samples). Hope it helps!