Hi Ton,
We have checked your reported query and prepared the sample
based on your requirement. Using the Dropdown List component, we can’t achieve
your requirement like shown in your screenshot. But we can achieve your desired
output in Dropdown Button component. kindly refer to the below code snippet and
sample link.
UG link: https://ej2.syncfusion.com/react/documentation/drop-down-button/popup-items
Using the popup templating feature, we can set the Menu
component within the Dropdown Button popup shown as below.
<DropDownButtonComponent content="Content" target='#target'></DropDownButtonComponent>
……
<div id="target">
<MenuComponent items={menuItems} orientation="Vertical"/>
</div>
|
Output screenshot:
Sample link: https://stackblitz.com/edit/react-pwktk1?file=index.js
Get back to us if you need any further
assistance on this.
Regards,
YuvanShankar A