Skip to content

Conversation

VividLemon
Copy link
Contributor

@VividLemon VividLemon commented May 5, 2025

 <VuetifyTiptap
    v-model="interceptor"
    :extensions="extensions"
    :disabled="foo"
    :disable-toolbar="foo"
  />
  {{ foo }}
  <VBtn @click="foo = !foo">Toggle</VBtn>

const foo = ref(false)

When ran like this, VuetifyTiptap doesn't respect changing foo (disabled does)

This occurs because provide('disableToolbar', props.disableToolbar) passes the primitive true/false value, rather than a reactive value

const disableToolbar = inject<boolean>('disableToolbar', false) removes the default value. This is because undefined will be it's falsy replacement. Since we don't want to match types and create another ref we just use undefined

I was having an issue with the dev server, so I didn't test this. It seemed like a straightforward change, sorry.

@yikoyu
Copy link
Owner

yikoyu commented May 8, 2025

Thank you for your contribution! It seems the PR was submitted to the wrong branch. Could you please submit it to the develop branch instead? Let me know if you need any help!
Thanks! 😊

@VividLemon VividLemon changed the base branch from master to develop May 8, 2025 01:51
@VividLemon VividLemon marked this pull request as draft May 8, 2025 01:52
@VividLemon VividLemon marked this pull request as ready for review May 8, 2025 02:16
@VividLemon
Copy link
Contributor Author

Done

@yikoyu yikoyu merged commit 8f218b4 into yikoyu:develop May 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants