toast-ui.vue-calendar icon indicating copy to clipboard operation
toast-ui.vue-calendar copied to clipboard

Slot for custom buttons

Open WisdomSky opened this issue 5 years ago • 2 comments

Instead of recommending us to create our own custom popups, why not take advantage of vue's slots?

image

There are many cases where we want to use other buttons instead of edit and delete. We should be able to easily add our own into this bottom section of the popup via slots. That would've made our lives easier and never have to re-invent the wheel.

WisdomSky avatar Feb 17 '20 02:02 WisdomSky

Simply changing the label of a button can be changed using a template option. https://nhn.github.io/tui.calendar/latest/tutorial-example16-template-for-popup

However, to change it in detail, you need to create a custom popup. https://github.com/nhn/tui.calendar/blob/master/docs/getting-started.md#customize-popups

jungeun-cho avatar Feb 17 '20 02:02 jungeun-cho

I understand. I'm a Vue's user, too. And I'm aware of that slot is very useful to customize components. But this vue component of TOAST UI Calendar is just a wrapper which is not containing any vue rendering process. It's pure DOM rendering. If this can use slot about all customizable pure DOM rendering, It'll be very big tasks. So we don't have any plan yet.

dongsik-yoo avatar Feb 17 '20 02:02 dongsik-yoo