Our powerful JS Calendar component


Post by licjapodaca »

An aleatory error when I click over the OverflowPopup button because I need to suspend the original behavior that appears the Tooltip Popup, I just want to expand the AllDays section like the original button:

same-behavior.png
same-behavior.png (111.07 KiB) Viewed 863 times

The code that suspend the Tooltip Popup is like so:

...
modes: {
	day: {
		allDayEvents: {
			overflowPopup: {
				listeners: {
					beforeShow: function () {
						try {
							if (!Ext.Object.isEmpty(vista._calendar)) {
								vista._calendar.modes.day.allDayEvents.toggleExpandCollapse();
							}
							return false;
						} catch (e) {
							Ext.raise({ msg: e.message, errorType: e.name, stack: e.stack });
						}
					}
				}
			}
		}
	}
}
...

But some times when I click over the OverflowPopup button of the day, aleatory appears me an error like so:

aleatory-error.png
aleatory-error.png (236.78 KiB) Viewed 863 times

Please help me with this error...

Regards


Post by Animal »

When you break at that line, what's happening?


Post by Animal »

But it should be as easy as it is in MonthView.

We'll fix that: https://github.com/bryntum/support/issues/3924


Post by Animal »

Also, there's an event before it gets to the stage of showing the popup. We made a mistake in not documenting it.

The showOverflowPopup event fires when the user makes the cellOverflowGesture. It is a preventable event.

I will make it public as part of the same ticket, but I will rename it to beforeShowOverflowPopup to be in line with other preventable event names.


Post by Animal »

About your error, I have changed the "bigdataset" locally example to use

    modes : {
        day : {
            allDayEvents : {
                overflowPopup: {
                    listeners: {
                        beforeShow: function () {
                            calendar.modes.day.allDayEvents.toggleExpandCollapse();
                            return false;
                        }
                    }
                }
            }
        }
    },

And it works completely as expected. It expands the all day row.


Post by licjapodaca »

Yes, I know that the last code works, but sometimes aleatory appears the error that I report in this ticket ... I dont know if the other Bryntum components do something that throws this error because I have the Calendar, TaskBoard and Gantt Bryntum components too ...

So the solution here is to continue use the following code?

...
    modes : {
        day : {
            allDayEvents : {
                overflowPopup: {
                    listeners: {
                        beforeShow: function () {
                            calendar.modes.day.allDayEvents.toggleExpandCollapse();
                            return false;
                        }
                    }
                }
            }
        }
    },
...

Regards

Last edited by licjapodaca on Tue Dec 21, 2021 8:48 pm, edited 1 time in total.

Post by Animal »

The error appears to be in your code. It seems to be in ’Printer.js’. It just needs somebody to debug it.


Post by licjapodaca »

OK I will debug it ... and feedback to you ... thanks


Post Reply