Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</div>
</Modal>

<router-view v-show="!cardDetailsInModal || !$route.params.cardId" name="sidebar" />
<router-view name="sidebar" :visible="!cardDetailsInModal || !$route.params.cardId" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't use v-if directly on the router-view?

Copy link
Copy Markdown
Member Author

@juliusknorr juliusknorr Nov 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some issue with the nested router views that are used for sub-routes, where the router tried to render the component to a non-existing router-view element then. That is why I went that way for now. But I have that on my list to investigate further, so this is more a temporary workaround to fix the bug.

</Content>
</template>

Expand Down
8 changes: 7 additions & 1 deletion src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
-->

<template>
<router-view name="sidebar" />
<router-view v-if="visible" name="sidebar" />
</template>

<script>
export default {
name: 'Sidebar',
props: {
visible: {
type: Boolean,
default: true,
},
},
methods: {
closeSidebar() {
this.$router.push({ name: 'board' })
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/Description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default {
const clickedIndex = [...document.querySelector('#description-preview').querySelectorAll('input')].findIndex((li) => li.id === e.target.id)
const reg = /\[(X|\s|_|-)\]/ig
let nth = 0
const updatedDescription = this.description.replace(reg, (match, i, original) => {
const updatedDescription = this.card.description.replace(reg, (match, i, original) => {
let result = match
if ('' + nth++ === '' + clickedIndex) {
if (match.match(/^\[\s\]/i)) {
Expand Down