Our powerful JS Calendar component


Post by ccarleykxs »

Hi there,

I'm new to the Bryntum-verse, and was looking into implementing multi-level filtering on the event store.
In the ideal world, I would have three separate resourceFilters present in my calendars sidebar, filtering based on variables within the events.

I'm trying to find examples to handle this, but I can only seem to find examples of multiple filters using multiple stores. Is there any material I can use to further learn the best path to implement what I'm looking for?

Thanks.


Post by marcio »

Hey ccarleykxs,

Thanks for reaching out and welcome to our forums! :)

Please take a look at this documentation
https://bryntum.com/products/calendar/docs/guide/Calendar/data/storebasics#filtering
https://bryntum.com/products/calendar/docs/api/Core/data/mixin/StoreFilter
https://bryntum.com/products/calendar/docs/api/Core/data/mixin/StoreChained

Could you please provide more context (or a use case) of that multi-level filtering that you're looking for in the event store? You can add multiple filters at the same store using https://bryntum.com/products/calendar/docs/api/Core/data/mixin/StoreFilter#function-filter or you can also have a filter function that contains several verifications to define which records will be filtered.

Best regards,
Márcio


Post by ccarleykxs »

Thanks for the warm welcome and quick reply ! :)
Ideally, this is the functionality I'm looking for:

In this instance, lets say a 'tag' data member.

Located in the sidebar, I have a list of distinct checkboxes / combo boxes with the tag values populated. When clicking on said check/combo box, I want to filter down to only the events that have said tag. Ideally, this would be multi select.

This is the kind of behavior I'm looking to replicate, but across multiple data members.


Post by Animal »


Post by Animal »


Post by ccarleykxs »

I guess my issue is that I won't know what the fields will be ahead of time (i.e we're sending down user data to populate said filter checkboxes), so I can't pre-define things like in the example, and since we'll be sending down new events, I would want these filters to be up to date with the current data in said fields.

Would it be possible to create a custom widget for this use case, or would that be overkill?


Post by Animal »

You can add widgets at any time, so just when you have your data, set up the config object and just add it to the sidebar


Post by ccarleykxs »

Gotcha. This can definitely be the approach I take.

I think I was just concerned about constantly maintaining the state of each 'filter group'. I.e I want them to be in alphabetical order, and was wondering if this is all something that could be done via creating a custom widget.

All the guidance thus far is appreciated.


Post by marcio »

Hey,

Do you need assistance with that sorting part? Could you please confirm that?

Best regards,
Márcio


Post by ccarleykxs »

I don't think I need help, unless there are some handy methods that I'm unaware of to sort widgets :)

edit: I actually don't see a simple way to insert or sort widgets, so perhaps a hand would be nice :)

Thanks for the help!

Last edited by ccarleykxs on Mon Aug 12, 2024 6:47 pm, edited 1 time in total.

Post Reply