We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

problems with databinding to a dropdownbutton

Hi,

I am getting Data from an API, it is an array of objects. They look like the screenshot from pinia:


in the template I use a field: 

fields: { dataSource: store.menue, id: 'id', text: 'name' }

and the dropdown:

<ejs-dropdownbutton :fields=fields>Clipboard</ejs-dropdownbutton>


the component has its fields and they are filled correctly:



But the list stays empty:


What am I doing wrong?



1 Reply

YA YuvanShankar Arunagiri Syncfusion Team March 30, 2023 10:05 AM UTC

Hi Michaela,


We have checked your reported query and for clarification, Dropdown Button component does not have field property for assigning the items, in dropdown button have items property use to set the popup items.


Kindly refer to the below UG and API link.


UG link: https://ej2.syncfusion.com/vue/documentation/drop-down-button/getting-started#run-the-application


API link: https://ej2.syncfusion.com/vue/documentation/api/drop-down-button/#items


Get back to us if you need any further assistance on this. 


Regards,

YuvanShankar A


Loader.
Live Chat Icon For mobile
Up arrow icon