nhn / toast-ui.react-calendar

TOAST UI Calendar wrapper for React.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot update option template - time

nhatdq1810 opened this issue · comments

Version

1.0.4

Test Environment

Browser: Chrome 77.0.3865.120
OS: Windows

Current Behavior

  • Set <Calendar ref={calendarRef} template={{time: getTimeTemplate(calendarView)}} />
  • When user changes calendar view - onChangeCalendarView even calls
calendarRef.current.getInstance().setOptions({
  template: { time: getTimeTemplate(calendarView) }
})
  • Function getTimeTemplate is like
const getTimeTemplate = (calendarView) => (schedule) => {
  return calendarView === 'month' ? 'aaa' : 'bbb';
};
  • The template of time is not changed

Expected Behavior

The template should be changed

@nhatdq1810
TOAST UI Calendar bug.
If you pass a template prop to setOptions, it doesn't apply!

I'll register the issue and manage it here.

Patched in v1.12.10 :)