search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to combine filter by events with filter by rows

Asked by Hoang Nguyen
6 years ago.

I would like to know how can I combine filter by events with filter by rows. For example, I have a scheduler with resources with 100 rooms. Each room has events of person rented. I need to search for all events which person name is joe doe. The scheduler.events.filter will work. However, after searching is done. Scheduler will display only events with joe doe in it. There will be several rows (resources) still display on scheduler with empty row (no event or events are all invisible). How can I hide these row. Thank toy very much.

Answer posted by Dan Letecky [DayPilot]
6 years ago.

The latest sandbox build now extends the filtering API (both events and rows) so it doesn't force an update during the filter() call.

Both methods have been extended with a second parameter (dontUpdate) which prevents a Scheduler update if set to true:

DayPilot.Scheduler.events.filter(param, dontUpdate);
DayPilot.Scheduler.rows.filter(param, dontUpdate);

This way you can set both filter and request a single update which applies both of them to the UI:

dp.events.filter(eventsFilterParam, true);
dp.rows.filter(rowsFilterParam, true);
dp.update();

It's available since 2018.3.3384:
https://javascript.daypilot.org/sandbox/

Comment posted by Hoang Nguyen
6 years ago.

Thank you sir very much for your quick respond. The url in the sandbox is trial. Where can I find the url for licensed DayPilot

I have look into my package.json and I found the url with version number: 2018.2.3244.tar.gz

My manager is the one who bought DayPilot for us to use.

Comment posted by Dan Letecky [DayPilot]
6 years ago.

The development versions are only available as a trial version. The new release will be available next week and you'll be able to use your licensed copy.

Comment posted by Hoang Nguyen
6 years ago.

Thank you sir for updating me. I have just found out that all I have to do is update my package.json with the latest version number (the end of the url) that will update DayPilot component. Now how can I find out what is your newest version number? one you release this new version, please kindly let me know. Thank you very much.

Comment posted by Hoang Nguyen
6 years ago.

I am checking the version:

npm install https://npm.daypilot.org/daypilot-pro-angular/trial/2018.3.3385.tar.gz --save

from Sandbox but:

DayPilot.Scheduler.events.filter(param, dontUpdate);
DayPilot.Scheduler.rows.filter(param, dontUpdate);

will not work because Visual Studio Code throwing error of expecting 1 parameter input but 2 are inputting.

Am I missing anything or am I doing something wrong here? Thank you very much.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.