Premium support for our pure JavaScript UI components


Post by gorakh.nath »

Hi Team,
How can I clear the text added in filter on change of date.

https://bryntum.com/examples/examples-scheduler/filtering/

In this example we can see the date added in header https://bryntum.com/examples/examples-scheduler/vertical/ now on change of filter need to clear the filter because we are calling the api call to load fresh data on change of date.

Attachments
Screenshot 2021-10-21 at 11.36.38 AM.png
Screenshot 2021-10-21 at 11.36.38 AM.png (153.09 KiB) Viewed 550 times

Post by mats »

https://bryntum.com/docs/scheduler/api/Core/data/mixin/StoreFilter#function-clearFilters

Just call clearFilters anytime

scheduler.resourceStore.clearFilters()

Post by gorakh.nath »

I want to clear the text entered as shown in screenshot.

Attachments
Screenshot 2021-10-21 at 4.20.08 PM.png
Screenshot 2021-10-21 at 4.20.08 PM.png (190.96 KiB) Viewed 545 times

Post by mats »

Just set

field.value = ''


Post by gorakh.nath »

Hi mats,
If you open this https://www.bryntum.com/examples/scheduler-pro/maps/ Whenever we click on the date change we have to clear the search text box's text, how can we do that?

Attachments
Screenshot 2022-03-30 at 11.55.29 AM.png
Screenshot 2022-03-30 at 11.55.29 AM.png (206.78 KiB) Viewed 406 times

Post by alex.l »

Try to clear value on data change handler onDateFieldChange

    onDateFieldChange({ value, userAction }) {
        // this line below
        userAction && this.widgetMap.filterByName.value = '';
        userAction && this.setTimeSpan(DateHelper.add(value, 8, 'hour'), DateHelper.add(value, 20, 'hour'));
    }

All the best,
Alex


Post Reply