How to create a multi action "actions" PreviewWidget?

Asked by Michael Weimann

Hello,

I'm not sure how to create an "actions" PreviewWidget with multiple actions. This one doesn't seem to work:

var multiActions = new scopes.lib.PreviewWidget('multiActions', 'actions');
multiActions.add_attribute_value('actions', [
    {
         id: 'action1',
         label: 'Action 1',
         uri: 'http://www.example.com/'
    },
    {
         id: 'action2',
         label: 'Action 2',
         uri: 'http://www.example.com/'
    }
]);

The JavaScript scopes doc doesn't provide info about this.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
unity-js-scopes Edit question
Assignee:
No assignee Edit question
Solved by:
Alexandre Abreu
Solved:
Last query:
Last reply:
Revision history for this message
Best Alexandre Abreu (abreu-alexandre) said :
#1

This should work, a more general bug has been fixed and is pending release around array as PreviewWidgets attribute values not being properly handled. It should solve your issue,

Revision history for this message
Michael Weimann (m982) said :
#2

Okay, I'll wait for the update...

Revision history for this message
Michael Weimann (m982) said :
#3

Thanks Alexandre Abreu, that solved my question.