Our pure JavaScript Scheduler component


Post by asharafshahi »

I created a simple menu item via features like this:
eventContextMenu: {
              items: {
                extraItems: {
                  text: 'View User',
                  icon: 'b-fa-user',
                  onItem({ eventRecord }) {
                    scheduler.current.destroy()
                    history.push(`/users/${eventRecord.data.userId}`)
                  }
                }
              }
            }
All I want to do is navigate to a different page and display info about that user. However, the context menu remains open and there are a flurry of errors in the console:
Attachments
screenshot.png
screenshot.png (848.7 KiB) Viewed 998 times

Post by sergey.maltsev »

Hi!

It is rather hard to give you a certain answer without full app code.
But obviously you should inspect scheduler.current.destroy().
Why you call it within menu's onItem?

You could also use https://www.bryntum.com/docs/scheduler/#Core/widget/MenuItem#config-href to use menu item as link.

Post by asharafshahi »

I apologize, scheduler.current.destroy() was actually not in there, I had tried that as a way to ‘close’ the scheduler before navigating away. The problem happened before I added that line.

Post by asharafshahi »

Also I am using react, so I’m using the history object instead of a normal Dom link

Post by sergey.maltsev »

Hi!

Please attach app code here so we could build and check it.

Post Reply