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

Which method should I call to start a search ? #7097

Open
sdespont opened this issue Dec 12, 2023 · 2 comments
Open

Which method should I call to start a search ? #7097

sdespont opened this issue Dec 12, 2023 · 2 comments
Labels
filter-control Issues for the filter-control extension. help-wanted Issues we need or would love help from the community to resolve.

Comments

@sdespont
Copy link
Contributor

sdespont commented Dec 12, 2023

Description

I use data-filter-control="true" and data-search-on-enter-key="true" to not start the search automatically. This way, the user can enter slowly the multiple texts to search in columns.

I would like to start the search by pressing a button.

Which method should I call to start a search ? Is there an existing button that I can show for manual search ?

For now, I use this code

            $('#start-search').click(function (){
                $('input.search-input').each(function() {
                    if ($(this).val() !== '') {
                        $(this).trigger({ type: 'keyup', which: 13, keyCode: 13 });
                        return false;
                    }
                });
            });

Example(s)

No response

@sdespont sdespont added the help-wanted Issues we need or would love help from the community to resolve. label Dec 12, 2023
@wenzhixin
Copy link
Owner

I think you can use the showSearchButton option.
Example: https://live.bootstrap-table.com/code/wenzhixin/16730

@wenzhixin wenzhixin added the awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days. label Dec 16, 2023
@sdespont
Copy link
Contributor Author

Thanks for your answer. Unfortunately, it is working with the searching bar but not with the filter control extension : https://live.bootstrap-table.com/code/sdespont/16808

@wenzhixin wenzhixin added filter-control Issues for the filter-control extension. and removed awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days. labels Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filter-control Issues for the filter-control extension. help-wanted Issues we need or would love help from the community to resolve.
Projects
None yet
Development

No branches or pull requests

2 participants