Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Editor & Inputs › How do I combine Input with native ES modules? › Reply To: How do I combine Input with native ES modules?
August 31, 2025 at 10:35 am
#112911
Keymaster
Hi,
Yes, you can use it. For example:
<smart-multi-combo-input id="employees"></smart-multi-combo-input>
<script>
const multiCombo = document.getElementById('employees');
// Fetch data from REST API
fetch('https://api.example.com/employees')
.then(response => response.json())
.then(data => {
// Assuming API returns: [{id:1, name:"Alice"}, {id:2, name:"Bob"}]
multiCombo.dataSource = data.map(emp => emp.name);
})
.catch(error => console.error('Error fetching employees:', error));
</script>
Best regards,
Markov
Smart UI Team
https://www.htmlelements.com/