Select to view content in your preferred language

DataActionList

255
1
10-15-2024 11:58 AM
Labels (1)
SaudAhmad
New Contributor

I have a custom widget to which I am trying to add a DataActionList component with the DataAction of ViewInTable.  I am usingthe documentation from StoryBook : https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-ui-lib-dataa...

 

I am expecting to see thisc(below image) added to my widget with single option to "View in Table TEST"

 

SaudAhmad_0-1729018374483.png

 

Code:

 { <DataActionList widgetId={props.id} dataSets={outputDS} listStyle='DROPDOWN' /> }
            DataActionManager.getInstance().getSupportedActions = (...args) => {
                return ({
                    export: [{
                        id: "view-in-table",
                        label: "View in Table TEST",
                        name: 'view',
                        icon: "icon.svg"
                    }]
                } as any);
            }
 
This code adds an option for View in Table TEST for other widgets with Data Action but not to my custom widget. Any ideas what I could be missing.
 
Thanks

 

0 Kudos
1 Reply
FangQi
by
Emerging Contributor

Hi Saud,

If you are trying to add a 'View in table' action for your custom widget, I think you don't need to overwrite the 'getSupportedActions' method, you only need to make sure that your 'dataSets' content satisfies 'View in table' action's requirements.

Besides, make sure that you are not excluding 'View in table' action in your custom widget's manifest.json.

0 Kudos