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

Fix bug with sorting applied to other colums having using function fields #803

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

p0psicles
Copy link
Collaborator

  • Changed dev/App.vue to highlight the issue.

codesandbox that shows the issue: https://codesandbox.io/s/clever-fog-2lfgg

@xaksis I'm not 100% sure this is the proper way of fixing this. I'm also not a full fledged js engineer. But the way it's now, using bound functions as fields, can cause multiple issues throughout the app.

I"m using function.name, to translate the bound function to something like: bound functionName.

This at least fixes my issue. Where when i'm using multiple bound functions for the fields, sorting one will also sort the other.

You might want to look into something a little less hacky? But that would require to refactor parts of the app. And store the field functions in a different format?

…elds.

* Changed dev/App.vue to highlight the issue.
@xaksis
Copy link
Owner

xaksis commented Jan 20, 2021

Hy @p0psicles the codesandbox shows me a default vue app. Am I missing something or was the sample code not saved?

@p0psicles
Copy link
Collaborator Author

p0psicles commented Jan 20, 2021

Try this? I don't use codesandbox that often..
https://codesandbox.io/s/exciting-lehmann-msen0?file=/src/components/HelloWorld.vue

Else look at dev/App.vue.
If you would just overwrite that in your master branch. You would see the issue, when you try to filter the valid and exact fields.

image

@p0psicles
Copy link
Collaborator Author

Any update on this?

@xaksis xaksis merged commit 119255f into xaksis:master Feb 17, 2021
@xaksis
Copy link
Owner

xaksis commented Feb 17, 2021

The only issue here is that the function name can be '' or anonymous which isn't unique. So i'll need to modify the getField function a bit before rollout.

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

Successfully merging this pull request may close these issues.

2 participants