Skip to content
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

[Bug Report] Error when using a RegExp in group property of v-list-group #7812

Closed
garcianavalon opened this issue Jul 12, 2019 · 8 comments
Closed
Assignees
Labels
C: VListGroup VListGroup T: bug Functionality that does not work as intended/expected
Milestone

Comments

@garcianavalon
Copy link

Versions and Environment

Vuetify: 1.5.16
Vue: 2.6.10
Browsers: Chrome 75.0.3770.100
OS: Mac OS 10.14.5

Steps to reproduce

https://codepen.io/anon/pen/WqWxvE?editors=1111

Expected Behavior

group property in v-list-groups accepts RegExp, as stated in the docs.

Actual Behavior

Invalid prop: type check failed for prop "group". Expected String with value "/foo/g", got RegExp

Reproduction Link

https://codepen.io/anon/pen/WqWxvE?editors=1111

Other comments

This used to work, but I can't figure out in which Vuetify version

@ghost ghost added the S: triage label Jul 13, 2019
@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VListGroup VListGroup and removed S: triage labels Jul 14, 2019
@ant1m4tt3r
Copy link
Contributor

I don't have a lot of experience with the code base, but do you guys think that if we update the group prop on the VListGroup.ts file it will fix this? Now it takes a String and my proposal is to change it to receibe both Strings and RegExp.

image

Already checked where the 'group' prop is used and seems to be on a single validation in the 'matchRoute' method of the same file. Since it is matching the route to the group prop, I think it will do the same job if it was a RegExp.

@jacekkarczmarczyk
Copy link
Member

Yeah, I looked at it before and I think that this is valid solution

@ant1m4tt3r
Copy link
Contributor

Nice. I'll make a PR

@ant1m4tt3r
Copy link
Contributor

I'm having a problem here. When I changed the group prop from group: String to whats on the first image, my editor is pointing this errors on the second image.

image

image

Already runned all the test and linting suites, and everything was fine. Can someone explain this to me? Should I commit this anyway because it's just a bug with my VSCode?

@ant1m4tt3r
Copy link
Contributor

@jacekkarczmarczyk do you have any clues about this?

@jacekkarczmarczyk
Copy link
Member

jacekkarczmarczyk commented Jul 23, 2019

not really, it's working for me (both in vscode 1.36.1 and in yarn lint)
btw add trailing comma after null
also you can create pr and see if it fails on github

@hpo14
Copy link

hpo14 commented May 18, 2021

why this hasnt fixed ?

@KaelWD
Copy link
Member

KaelWD commented Jun 22, 2021

That description was added in 54038a7. The group prop hasn't been touched since b8801e4.

@KaelWD KaelWD self-assigned this Jun 22, 2021
@KaelWD KaelWD added this to the v2.5.x milestone Jun 22, 2021
@KaelWD KaelWD closed this as completed in 43b0406 Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VListGroup VListGroup T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

6 participants