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

change values in ajaxParams when calling update() #37

Closed
yabdab opened this issue Dec 8, 2022 · 2 comments
Closed

change values in ajaxParams when calling update() #37

yabdab opened this issue Dec 8, 2022 · 2 comments

Comments

@yabdab
Copy link

yabdab commented Dec 8, 2022

When I create the table using ajaxParams everything works great.

The problem is, I want to change the ajaxParams and update the table. The initial values never change.

Is there a way to do this without having to tear down and rebuild the table?

@Trekky12
Copy link
Collaborator

Trekky12 commented Dec 8, 2022

I think it should be possible to change the value of jstable.config.ajaxParams after the initialization.
The fetch request is always using the latest version of the config (see

params = Object.assign({}, this.config.ajaxParams, params);
)

@yabdab
Copy link
Author

yabdab commented Dec 8, 2022

Excellent! Exactly what I needed. Thanks so much friend.

@yabdab yabdab closed this as completed Dec 8, 2022
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

No branches or pull requests

2 participants