I want to make the resource field a typeahead where I can type 3 letters and the drop down list gets updated with the resources that match the entered string. And i need to make this field to select only one resource at a time and not multiple. The following is a reference of how i want the resource field to look like. How will i be able to do this?
Support Forum
Hi!
ResourceCombo
natively supports filtering when you type.
If you want to get all matches, which includes any of the typed letters you may setup this config option
https://bryntum.com/products/scheduler/docs/api/Scheduler/widget/ResourceCombo#config-primaryFilter
In EventEdit you may configure Resource field widget
https://bryntum.com/products/scheduler/docs/api/Scheduler/feature/EventEdit#built-in-widgets
features : {
eventEdit : {
items : {
// In our event editor, we'd like to match-any resource names
// not just match from start.
resourceField : {
primaryFilter : {
operator : '*'
}
}
}
}
},
You may try in this online demo (Open editor at the top right corner)
If you assign resources to events using a set of assignments
in your data block, it will assume that you require multiple assignment:
assignments : {
"rows": [
{
"id": 1,
"eventId": 1,
"resourceId": "a"
},
...
]
}
If you don't want to change your data format to the inline resourceId
in the event data, then you can configure the event store to only use single assignment:
project : {
eventStore : {
singleAssignment : true
}
}