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

Filter not working when setting it as an attribute in sveltekit #23

Closed
tugbrandsapps opened this issue Dec 30, 2023 · 4 comments
Closed
Assignees
Labels
advice Information how to use/implement the component

Comments

@tugbrandsapps
Copy link

When adding filter="true" to the active-table element in my sveltekit app, or a filter with an object or array of objects, it breaks the table. It should also be noted that the same thing happens on your sveltekit repo at https://codesandbox.io/p/sandbox/active-table-sveltekit-forked-fy9wlf

@OvidijusParsiunas
Copy link
Owner

OvidijusParsiunas commented Dec 30, 2023

Hi @tugbrandsapps.

Can you try to use the curly braces syntax like: filter={true} to see if it works for you. Thanks!

@OvidijusParsiunas OvidijusParsiunas self-assigned this Dec 30, 2023
@tugbrandsapps
Copy link
Author

Yes, it does work. I would say it is a little confusing to know when we can send in an object directly and when it must be stringified.

@OvidijusParsiunas
Copy link
Owner

We usually recommend setting values as properties rather than attributes when you are using a framework. In the Svelte case - that would be using the {} syntax rather than "".

Hopefully this helps.

@OvidijusParsiunas OvidijusParsiunas changed the title Filter not working in sveltekit Filter not working when setting it as an attribute in sveltekit Dec 31, 2023
@OvidijusParsiunas OvidijusParsiunas added the advice Information how to use/implement the component label Dec 31, 2023
@OvidijusParsiunas
Copy link
Owner

I will close this issue since the original problem has been resolved. If you have any further queries relating to this matter, feel free to comment below. For anything else you are more than welcome to raise a new issue.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advice Information how to use/implement the component
Projects
None yet
Development

No branches or pull requests

2 participants