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

Improving filter control #5583

Merged
merged 74 commits into from Feb 10, 2022
Merged

Improving filter control #5583

merged 74 commits into from Feb 10, 2022

Conversation

djhvscf
Copy link
Collaborator

@djhvscf djhvscf commented Feb 8, 2021

Improving filter control extension

Default options:

  • filterControl
  • filterControlVisible
  • onColumnSearch
  • onCreatedControls
  • alignmentSelectControlOptions:
  • filterTemplate
  • disableControlWhenSearch (removed)
  • searchOnEnterKey
  • showFilterControlSwitch
  • filterControlContainer

Column options:

  • filterControl // input
  • filterControl //select
  • filterControl // datepicker
  • filterDataCollector
  • filterData
  • filterDatepickerOptions
  • filterStrictSearch
  • filterStartsWithSearch
  • filterControlPlaceholder
  • filterDefault
  • filterOrderBy // asc
  • filterOrderBy // desc

Scenarios

  • When height is not set //input
  • When height is set // input
  • When height is not set // select
  • When height is set // select
  • When height is not set // datetimepicker
  • When height is set // datetimepicker
  • Show Columns when height is not set
  • Show Columns when height is set

Integrations

Update docs

  • Add/Remove documentation

Fix #5541 (https://live.bootstrap-table.com/code/djhvscf/9665)
Fix #5588 (https://live.bootstrap-table.com/code/djhvscf/9666)
Fix #4998 (https://live.bootstrap-table.com/code/djhvscf/9667)
Fix #5468 (https://live.bootstrap-table.com/code/djhvscf/9690)
Fix #5684 (https://live.bootstrap-table.com/code/djhvscf/9691)
Fix #4984 (https://live.bootstrap-table.com/code/djhvscf/9692)
Remove from scope #5573. See #5968
Fix #5446 (https://live.bootstrap-table.com/code/djhvscf/7411)
Remove from scope #3298
Fix #5146 (https://live.bootstrap-table.com/code/djhvscf/9694)
Fix #5690 (https://live.bootstrap-table.com/code/djhvscf/7438)
Fix #5572 (https://live.bootstrap-table.com/code/djhvscf/7445)
Fix #5713 (https://live.bootstrap-table.com/code/djhvscf/9695)
Remove from scope #5848
Fix #5960 (https://live.bootstrap-table.com/code/djhvscf/9696)
Fix #5774 (https://live.bootstrap-table.com/code/djhvscf/9719)
Fix #5820 (https://live.bootstrap-table.com/code/djhvscf/9720)
Fix #5828 (https://live.bootstrap-table.com/code/djhvscf/9721)
Fix #5833 (https://live.bootstrap-table.com/code/djhvscf/9722)
Fix #5859 (https://live.bootstrap-table.com/code/djhvscf/9723)
Fix #5630 (https://live.bootstrap-table.com/code/djhvscf/9726)
Fix #5687 (https://live.bootstrap-table.com/code/djhvscf/9863)
Fix #6004 (https://live.bootstrap-table.com/code/UtechtDustin/10038)

@djhvscf
Copy link
Collaborator Author

djhvscf commented Mar 15, 2021

@wenzhixin @DustinUtecht Hey guys, I'm planning to remove the datepicker stuff (that depends on a third party library ) and use the html5 control.. what do you think?

@UtechtDustin
Copy link
Collaborator

Its fine for me, we should avoid third party libraries as much as we can.

@djhvscf
Copy link
Collaborator Author

djhvscf commented Apr 18, 2021

@wenzhixin @UtechtDustin can you please help me with this CSS issue?

image

@yeezy69
Copy link

yeezy69 commented Dec 4, 2021

Sorry, I have to annoy you again ;-) I use a page with two tables. The tables have columns with identical names.

The search in the first (domains) table works fine. When searching in the second (zones) table for "ID" and "User", the search-string disappears from the input fields. When searching in "Zone" column no problem.

table for explanation:

<table id="tableDomains" data-ajax="ajaxRequestDomains" data-side-pagination="server" data-filter-control="true">
    <thead>
        <tr>
            <th data-field="id" data-filter-control="input">ID</th>
            <th data-field="user_name" data-filter-control="input">User</th>
            <th data-field="domain_name" data-filter-control="input">Domain</th>
        </tr>
    </thead>
</table>

<table id="tableZones" data-ajax="ajaxRequestZones" data-side-pagination="server" data-filter-control="true">
    <thead>
        <tr>
            <th data-field="id" data-filter-control="input">ID</th>
            <th data-field="user_name" data-filter-control="input">User</th>
            <th data-field="zone_name" data-filter-control="input">Zone</th>
        </tr>
    </thead>
</table>

I suspect this is missing a table-id check?

@djhvscf
Copy link
Collaborator Author

djhvscf commented Dec 5, 2021

Sorry, I have to annoy you again ;-) I use a page with two tables. The tables have columns with identical names.

The search in the first (domains) table works fine. When searching in the second (zones) table for "ID" and "User", the search-string disappears from the input fields. When searching in "Zone" column no problem.

table for explanation:

<table id="tableDomains" data-ajax="ajaxRequestDomains" data-side-pagination="server" data-filter-control="true">
    <thead>
        <tr>
            <th data-field="id" data-filter-control="input">ID</th>
            <th data-field="user_name" data-filter-control="input">User</th>
            <th data-field="domain_name" data-filter-control="input">Domain</th>
        </tr>
    </thead>
</table>

<table id="tableZones" data-ajax="ajaxRequestZones" data-side-pagination="server" data-filter-control="true">
    <thead>
        <tr>
            <th data-field="id" data-filter-control="input">ID</th>
            <th data-field="user_name" data-filter-control="input">User</th>
            <th data-field="zone_name" data-filter-control="input">Zone</th>
        </tr>
    </thead>
</table>

I suspect this is missing a table-id check?

Probably yes. I'm going to review that

@djhvscf
Copy link
Collaborator Author

djhvscf commented Dec 5, 2021

Sorry, I have to annoy you again ;-) I use a page with two tables. The tables have columns with identical names.
The search in the first (domains) table works fine. When searching in the second (zones) table for "ID" and "User", the search-string disappears from the input fields. When searching in "Zone" column no problem.
table for explanation:

<table id="tableDomains" data-ajax="ajaxRequestDomains" data-side-pagination="server" data-filter-control="true">
    <thead>
        <tr>
            <th data-field="id" data-filter-control="input">ID</th>
            <th data-field="user_name" data-filter-control="input">User</th>
            <th data-field="domain_name" data-filter-control="input">Domain</th>
        </tr>
    </thead>
</table>

<table id="tableZones" data-ajax="ajaxRequestZones" data-side-pagination="server" data-filter-control="true">
    <thead>
        <tr>
            <th data-field="id" data-filter-control="input">ID</th>
            <th data-field="user_name" data-filter-control="input">User</th>
            <th data-field="zone_name" data-filter-control="input">Zone</th>
        </tr>
    </thead>
</table>

I suspect this is missing a table-id check?

Probably yes. I'm going to review that

Can you create an example using our online editor? @yeezy69 I can't reproduce it locally

@yeezy69
Copy link

yeezy69 commented Dec 5, 2021

Can you create an example using our online editor? @yeezy69 I can't reproduce it locally

Just search in the second table: https://live.bootstrap-table.com/code/yeezy69/9864

@sdespont
Copy link
Contributor

sdespont commented Dec 9, 2021

Can you create an example using our online editor? @yeezy69 I can't reproduce it locally

Just search in the second table: https://live.bootstrap-table.com/code/yeezy69/9864

The example provided permits to reproduce the problem. The table is well sorted, but the searching string disappear :

image

@djhvscf
Copy link
Collaborator Author

djhvscf commented Dec 12, 2021

Can you create an example using our online editor? @yeezy69 I can't reproduce it locally

Just search in the second table: https://live.bootstrap-table.com/code/yeezy69/9864

The example provided permits to reproduce the problem. The table is well sorted, but the searching string disappear :

image

This is still in progress.

@sdespont
Copy link
Contributor

@djhvscf Except the last bug above, is the branch feature/multiselect-filtercontrol stable enough to be used in production?

@djhvscf
Copy link
Collaborator Author

djhvscf commented Dec 20, 2021

Yes, it is

@sdespont
Copy link
Contributor

@djhvscf OK, thanks for the reply. The dist folder of the feature/multiselect-filtercontrol branch is using the old version. Is there a link of a built version of bootstrap-table-filter-control.js ? Maybe a release can be done because you have fixed a lot of things in this branch?

@UtechtDustin
Copy link
Collaborator

@djhvscf OK, thanks for the reply. The dist folder of the feature/multiselect-filtercontrol branch is using the old version. Is there a link of a built version of bootstrap-table-filter-control.js ? Maybe a release can be done because you have fixed a lot of things in this branch?

The dist folder will be updatet on a new release, but never for a new branch.
You can build it youreself by run the build script with e.g. yarn yarn build.

@sdespont
Copy link
Contributor

sdespont commented Feb 8, 2022

Hi there 👋, is there plan to release this PR in the next weeks?

@wenzhixin
Copy link
Owner

@UtechtDustin I have improved some codes. I think we can merge this PR now.

@wenzhixin wenzhixin merged commit 55a1a6f into develop Feb 10, 2022
@wenzhixin wenzhixin deleted the feature/multiselect-filtercontrol branch February 10, 2022 11:49
@djhvscf
Copy link
Collaborator Author

djhvscf commented Feb 18, 2022

@wenzhixin @UtechtDustin thanks guys! I have been kind of busy because I have a new baby and you know.. we need to sleep, feed him and so

@UtechtDustin
Copy link
Collaborator

@wenzhixin @UtechtDustin thanks guys! I have been kind of busy because I have a new baby and you know.. we need to sleep, feed him and so

Congrats!
I can totally understand that, my son is coming in june and we are building a house right now.
Unfortunately I aldo don't have that much time right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment