Skip to content

Filter state properties like filtering components #401

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

Closed
ndabAP opened this issue Aug 26, 2017 · 4 comments
Closed

Filter state properties like filtering components #401

ndabAP opened this issue Aug 26, 2017 · 4 comments

Comments

@ndabAP
Copy link

ndabAP commented Aug 26, 2017

Problem: I have a complex and deep nested Vuex store. I often track those nested properties. The problem is now, every edit to the store requires a full page reload and the opened Vuex state is gone.

Feature request: It would be cool to search the store for properties like you can search components to quickly watch the desired nested property.

Might be a duplicate of #259, but the referenced issue with the referenced merge request didn't fulfill the feature request.

@LinusBorg
Copy link
Member

LinusBorg commented Aug 26, 2017

I just have two sidenotes:

  1. Hot Relaoding

The problem is now, every edit to the store requires a full page reload and the opened Vuex state is gone.

Have you actually applied the code outlined in vuex's docs for hot reloading? full page refreshs should not be necessary, usually.

https://vuex.vuejs.org/en/hot-reload.html

  1. Deeply nesting store

This is generally not advised. State should be normalized if possible. I realize that this is not always possible and your situation might be one of those, but I thought to mention it.

@ndabAP
Copy link
Author

ndabAP commented Aug 26, 2017

Have you actually applied the code outlined in vuex's docs for hot reloading?

Nice, something I'll definitely try out.

I realize that this is not always possible

Exactly. Imagine you have shop with a MongoDB database with redundancy and, like I do, one entity is mapped to one module. You may have something like this:

user: {
  basket: {
    products: {[
      product: {
        fromUser: {
          name: ''
        }
      }
    }]
  }
}

It would be nice to search for fromUser to watch for changes.

@Akryum Akryum added this to the 🎄Holiday Update milestone Jan 4, 2018
@Akryum Akryum changed the title Feature request: Filter state properties like filtering components Filter state properties like filtering components Jan 4, 2018
@ndabAP
Copy link
Author

ndabAP commented Jan 13, 2018

@yyx990803 this issue is not resolved. Or do you consider it implicitly resolved through #418?

The behavior I would expect would the same as filtering components: The match jumps to the deepest possible child node. Like:

User
  > Products
    > Product

Becomes when searching for Product:

Product

@Akryum
Copy link
Member

Akryum commented Jan 13, 2018

Except it doesn't work like that. 😛

Products
  > Product

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants