Our powerful JS Calendar component


Post by braincept »

Hi Team,

We are facing one issue in reinitializing the resourceFilter selected values.

this.sidebar.items.resourceFilter = {
      selected: {
        values: selectedValues
      },
      multiSelect: true
    }

Resource changes are not reflecting on UI. We are not able to uncheck or check the resources in the TS file. Is there any way to filter the selection of resources in TS file on the basis of certain conditions?

This issue we are facing after the loading of the calendar. The default selection of resources is working when we are initializing the resourceFilter but once the resourceFilter is initialized then we are not able to change the selection in TS file.

Thanks


Post by pmiklashevich »

This is not supported out of the box. Ticket here: https://github.com/bryntum/support/issues/2006
Please checkout the ticket for a workaround, but please make a note to remove it as soon as the ticket is fixed, since the workaround requires to override a private function. Cheers!

Pavel Miklashevich - Core Developer

Post by braincept »

@pmiklashevich When are you planing to release this fix? It says in 4.0.8. When is this planed? We are pretty much blocked with our development right now if we cannot modify the resource filter.


Post by pmiklashevich »

We have moved it to 4.1.0. We're going to have one more "patch" release containing just small bug fixes and then release a big "minor" release. There is a workaround to this issue which you can find in the description. Have you tried to apply it? Does it work for you? If it does, please use it meanwhile. Please subscribe to the ticket to get notified when it's done. Thanks!

Pavel Miklashevich - Core Developer

Post by braincept »

Hi Pavel,

1) I think typings are not available. We are getting compiler errors.
2)

super.onSelectionChange({source: _self.selected, removed: [], added: []});

We are not able to use this line of code because we are getting compiler errors. Error is

Property 'onSelectionChange' does not exist on type 'ResourceFilter'

Resource filter we are importing from here

import {ResourceFilter} from "bryntum-calendar/calendar.lite.umd.js";

Thanks
Braincept


Post by pmiklashevich »

Hello Braincept,

onSelectionChange is private. Only public properties/methods are described in the typings (Calendar/build/calendar.lite.umd.d.ts). Please mute the typescript error and add a notice to remove the override as soon as the ticket is fixed.

Best,
Pavel

Pavel Miklashevich - Core Developer

Post by braincept »

Thanks that worked, feel free to close this ticket :)


Post Reply