Skip to content

Commit

Permalink
feat(NcRichText): add style to mount point for custom picker element …
Browse files Browse the repository at this point in the history
…and custom wiget because mounting in vue3 does not replace the mount point but sets its innerHTML

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Sep 20, 2024
1 parent 3b7be87 commit d8b43a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<div v-else-if="mode === MODES.customElement"
class="custom-element-wrapper">
<NcCustomPickerElement :provider="selectedProvider"
class="custom-element"
@submit="submitLink"
@cancel="cancelCustomElement" />
</div>
Expand Down Expand Up @@ -180,6 +181,11 @@ export default {
display: flex;
overflow-y: auto;
width: 100%;
.custom-element {
display: flex;
overflow-y: auto;
width: 100%;
}
}
}
</style>
1 change: 1 addition & 0 deletions src/components/NcRichText/NcReferenceWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export default {
// create a separate element so we can rerender on the ref again
const widget = document.createElement('div')
widget.style = 'width: 100%;'
this.$refs.customWidget.appendChild(widget)
this.$nextTick(() => {
// Waiting for the ref to become available
Expand Down

0 comments on commit d8b43a7

Please sign in to comment.