I am trying to add on change and filter function on combo, but when I am trying to achieve this only only function is getting triggered, like if filter function is working onchange function is not working. Can i get resolution on this.
combo filter img1.png (78.14 KiB) Viewed 649 times
.here on change of fields calendar booking data dates should load relevant to the field which we selected.
attached image below for your reference.
combo filter img2.png (62.7 KiB) Viewed 649 times
. So when we select field we need data relevant data in down combo with for particular field reservations as shown in below image
combo filter 3.png (15.58 KiB) Viewed 649 times
. so we are using below code to work both functionalities one is filterfn and onchnage property but while using below code only one functionality is working
let resourceStoreInstance = Store.getStore("resources");
let { activeCenterName } = context;
//resourceStoreInstance.sort("name"); //sort all resources alphabetically in combo //!!(+ list?) /// This is causing the re-sort
let filterConfig = {
filterField: {
type: "combo",
value: activeCenterName,
valueField: "name",
displayField: "name",
multiSelect: false,
editable: false,
store: resourceStoreInstance.chain(
(record) => record.resourceType == "building"
),
//onChange : refreshOnCenterChange,
//
},
filterFn: ({ record, value }) => record.buildingName == value,
onChange:refreshOnCenterChange
};
return filterConfig;
}
Sorry, I'm still not sure what issue you're having when you select an item from the combo it does filters out the result. What is your expectation for that? can you please rephrase the issue that you're having?