Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More control for day cell content #93

Closed
r4fx opened this issue May 6, 2021 · 5 comments · Fixed by #95
Closed

More control for day cell content #93

r4fx opened this issue May 6, 2021 · 5 comments · Fixed by #95
Labels
enhancement New feature or request

Comments

@r4fx
Copy link

r4fx commented May 6, 2021

I found that dayCellContent property is a bit useless without parsing it in template by v-html directive.
By this small addition we could have more control with customizing day cell content.
What do you think about extend it? I could prepare PR.

@tomekszeliga
Copy link

@r4fx you are totally right! Would be great. We are trying to find another, hacky way to fix our issue, but having Proper solution would be great!

@MrWook
Copy link
Collaborator

MrWook commented May 7, 2021

I'm not really a fan of v-html, how about a slot?

<span
      v-for="cell in cells"
      :key="cell.timestamp"
      class="cell day"
      :class="dayClasses(cell)"
      @click="select(cell)"
    >
      <slot name="dayCell" :cell="cell">
         {{ dayCellContent(cell) }}
     </slot>
</span>

I will take some time at the beginning of next week to do this 👍

@MrWook MrWook added the enhancement New feature or request label May 7, 2021
@r4fx
Copy link
Author

r4fx commented May 10, 2021

Scoped Slot was my second thought. Would be great to have it.

@MrWook
Copy link
Collaborator

MrWook commented May 10, 2021

Would this meet your requirements?
#95

@r4fx
Copy link
Author

r4fx commented May 10, 2021

Looks fine, thanks for quick reaction! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants