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

'refresh' method doesn't reuse parameters provided as "query", it only takes "url". #7318

Open
utilmind opened this issue May 4, 2024 · 1 comment
Labels
awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days. Bug Issues which are marked as Bug needs example Need an example in order to confirm the issue or the PR.

Comments

@utilmind
Copy link
Contributor

utilmind commented May 4, 2024

Bootstraptable version(s) affected

1.22.5 (latest)

Description

Unfortunately "refresh" button on toolbar is useless, if I originally provide the request parameters as "query" property, instead of straightforward GET-query, as part of "url" property.

So if I originally provide data as follows, this will not work on manual "refresh" (click on refresh button on toolbar), it will just ignore "query" on repeating request:

$table.bootstrapTable('refresh', {
                            url: thisToolUrl,
                            query: prepareHttpQuery(),
                        });

However, the following will work:

$table.bootstrapTable('refresh', {
                            // httpBuildQuery converts array to &-separated and urlencoded 'key=value' pairs.
                            url: thisToolUrl + '?' + httpBuildQuery(prepareHttpQuery()), 
                        });

I think it should not ignore data provided in "query" on repeating "refreshes".
The workaround provided above is works for me, so I don't submitting the pool request, but would switch to "query" if it will be fixed in further Bootstrap Table versions.

Example(s)

No response

Possible Solutions

Fix initServer() method, reuse saved "query" parameter from previous "refresh" request.

Additional Context

No response

@utilmind utilmind added the Bug Issues which are marked as Bug label May 4, 2024
@utilmind utilmind changed the title 'refresh' method doesn't reuse parameters ("query"), it only takes "url". 'refresh' method doesn't reuse parameters provided as "query", it only takes "url". May 4, 2024
@wenzhixin
Copy link
Owner

Please provide an Online Example to show your problem. Thanks!

@wenzhixin wenzhixin added needs example Need an example in order to confirm the issue or the PR. awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days. labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days. Bug Issues which are marked as Bug needs example Need an example in order to confirm the issue or the PR.
Projects
None yet
Development

No branches or pull requests

2 participants