question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vuex not working with editmode, keyboardNavigation, deletion options

See original GitHub issue

Seems there is a bug with “node.startEditing” and keyboardNavigation and deletion options when tied to vuex. Everything works without vuex but when tied to treedata from store the edit does’t work. Or have i configured incorrectly?

treeFilter: '',
      treeOptions: {
        store: {
          store:this.$store,
          getter: () => {
            return this.$store.getters.tree
          },
          dispatcher: (tree) => {
            this.$store.dispatch('updateTree', tree)
          }
        },
        filter: {
          emptyText: 'No results found'
        },
        keyboardNavigation:true,
        deletion:true,
        dnd: true
      },

This is the tree component

<tree
                    :filter="treeFilter"
                    :options="treeOptions"
                    @node:dragging:start="logDragStart"
                    @node:dragging:finish="logDragFinish"
                  >
                    <div slot-scope="{ node }" class="node-container">
                      <div class="node-text">{{ node.text }}</div>
                      <div class="node-controls">
                        <a href="#" @mouseup.stop="editNode(node)">Edit</a>
                        
                      </div>
                    </div>
                  </tree>

This is the edit function in the methods

editNode(node, e) {
      node.startEditing()
    },

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thokkanecommented, Dec 19, 2018

@amsik any chance you have an update on this? The editmode is most important.

1reaction
amsikcommented, Nov 30, 2018

I will try to find the time on the weekends

Read more comments on GitHub >

github_iconTop Results From Across the Web

liquor-tree - Bountysource
I have a problem, when I refresh my tree data like this : this. ... startEditing" and keyboardNavigation and deletion options when tied...
Read more >
API Reference | Vuex
Each module can contain state and mutations similar to the root options. A module's state will be attached to the store's root state...
Read more >
Liquor Tree - GitHub Pages
By default keyboardNavigation options is true. It allows user to navigate the tree using a keyboard. Navigation is implemented in the usual way...
Read more >
vue.js - attempting to delete one to-do but instead all to-do's ...
vue devtools is showing that I am sending only the id I want to delete, I think the problem is with the mutation:...
Read more >
VueX Edit and Delete + Admin Page (Building a VueJS app ...
In this tutorial we'll be adding a delete button, an edit page, and an admin page to our VueJS app. Along the way...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found