dreamRs / toastui

R htmlwidgets for ToastUI libraries: grid, calendar and chart
https://dreamrs.github.io/toastui
Other
83 stars 8 forks source link

Added proxy for calendar navigation #33

Closed MichalLauer closed 1 year ago

MichalLauer commented 1 year ago

Added a proxy method to turn on and off the navigation visibility, fixing issue #31. I had to change a "core" mechanic of the nav display. It is now always rendered and only shown/hidden using CSS. I hope this is ok:)

I also added a small sanity check into "proxy-toastui-calendar-options" listener.

Feel free to reach out if any additional improvements are necessary for this pull-request. Thanks!

pvictor commented 1 year ago

Thanks, seems good but I still got a javascript error with the example in your issue when I toggle the navigation off/on and then click the next/prev buttons:

toastui-calendar.mjs:10262 Uncaught TypeError: Cannot read properties of undefined (reading 'getState')
    at Calendar.getStoreState (toastui-calendar.mjs:10262:1)
    at Calendar.move (toastui-calendar.mjs:10332:39)
    at Calendar.next (toastui-calendar.mjs:10448:1)
    at HTMLButtonElement.<anonymous> (calendar-utils.js:42:1)

Will check that later