Hi Anais,
Greetings from Syncfusion.
We have validated your reported query “I would like to be able to modify the service in the editor and the list of available devices would change as well. Is this possible?” at our end. We have achieved your requirement with the help of the below code.
[app.component.ts]
let projectElement: HTMLInputElement = args.element.querySelector('#ServiceId');
if (!projectElement.classList.contains('e-multiselect')) {
let projectObj: MultiSelect = new MultiSelect({
placeholder: 'Choose a Service',
fields: { text: 'text', value: 'id' },
dataSource: <any>this.projectDataSource,
value: <string[]>(((args.data as any).ServiceId instanceof Array) ? (args.data as any).ServiceId : [(args.data as any).ServiceId]),
change: (e) => {
let taskObj = (document.getElementById('DeviceId') as any).ej2_instances[0];
let value = e.value;
let result = this.categoryDataSource.filter(
(task) => (value as number[]).indexOf((task as any).groupId) > -1
)
taskObj.dataSource = result;
taskObj.value[0] = result.length > 0 ? (result[0] as any).id : [];
}
});
projectObj.appendTo(projectElement);
}
Kindly try the above sample and get back to us If you would require further assistance.
Regards
Ravikumar Venkatesan