rubanraj54 / vue-bootstrap4-table

Advanced table based on Vue 2 and Bootstrap 4 ⚡️
MIT License
219 stars 57 forks source link

filter only when CR pressed #42

Closed soongsta closed 5 years ago

soongsta commented 5 years ago

Hi @rubanraj54

Is there a way filter only after the Carriage Return button has been pressed. I am trying out server mode, and the ajax call is made for every key stroke. Because of @on-change-query="onChangeQuery"

Kind regards

rubanraj54 commented 5 years ago

Hi @soongsta

I will make it configurable in my next version. Also, I'll try to make a configuration for the debouncing duration between keystrokes.

Cheers, Ruby.

soongsta commented 5 years ago

Awesome

Thanks so much

On Wed, 17 Apr 2019 at 1:07 am, Rubanraj notifications@github.com wrote:

Hi @soongsta https://github.com/soongsta

I will make it configurable in my next version. Also, I'll try to make a configuration for the debouncing duration between keystrokes.

Cheers, Ruby.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rubanraj54/vue-bootstrap4-table/issues/42#issuecomment-483701725, or mute the thread https://github.com/notifications/unsubscribe-auth/AQTQ7o6d-7S778iQoKoDsUGTkfkdYZbcks5vhechgaJpZM4cxmXJ .

--

--

EBR - Ever Better Recruitment

Level 13, 465 Victoria Ave Chatswood NSW 2067

T: (02) 8001 6478

W: http:/www.ebr.com.au http://www.ebr.com.au

http://www.linkedin.com/company/ebr
https://www.facebook.com/EverBetterRecruitment
https://twitter.com/ebrjobs https://plus.google.com/+EbrAustralia

We love creating raving fans, please click linkedin recommendation https://www.linkedin.com/in/michelleseeto/detail/recommendation/write/ and google review https://www.google.com.au/search?q=ebr&oq=ebr+&ie=UTF-8#lrd=0x6b12a8d38ccecb51:0x295101017dcbadf7,3,,,  to let us know how you are feeling (it takes 5 seconds).

If you know of someone who is looking for staff or who would be great for one of our roles, please feel free to pass on my contact details. Thank you.

Inundated workload? Talk to your EBR consultant about temporary, contract and permanent staff for your team NOW!

Recruitment specialists in GIS, Environmental, IT & T, Engineering and Accounting & Finance for Australia and New Zealand Queensland Government GITC Accredited - Accreditation No.

Q-3431 EBR is an authorised supplier to NSW Government on 0007 Contingent Workforce.

This message (including any attachments) is intended solely for the addressee names and may contain confidential or privileged information. If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message are those of the individual sender, and are not necessarily the views of EBR.

rubanraj54 commented 5 years ago

Hi @soongsta ,

I've implemented this feature in the current develop branch and tomorrow I'll make a new release with instructions on how to use this feature.

Please update your package tomorrow and I'll post here how to configure this.

Cheers, Ruby.

rubanraj54 commented 5 years ago

Hi @soongsta

You can update your package to get this new feature.

...
columns: [
    {
        label: "First Name",
        name: "name.first_name",
        filter: {
            type: "simple",
            placeholder: "Enter first name",
            filterOnPressEnter: false,
            debounceRate: 1000  
        }
    }
]
...

Now you can set filterOnPressEnter to true to enable the filtering on 'enter' key press. Also, if you want to filter automatically but with high time gap between keystrokes, then you can set debounceRate to limit the trigger. The debounceRate should be in milliseconds.

For more information, you can refer this page https://app.gitbook.com/@rubanraj54/s/vue-bootstrap4-table/v/1.1.4/filtering#example .

Cheers, Ruby.

soongsta commented 5 years ago

Hey @rubanraj54 ,

I think there is a slight issue, when I use filterOnPressEnter with server side Steps to reproduce.

  1. user types a filter criteria, presses TAB to move to the next column
  2. user types a second filter criteria , presses CR

Expectation, both filter criteria is applied Actual: only the current column criteria is applied