Author Topic: Row 0 filter for date columns pressing tab/enter  (Read 1718 times)

cijojohn

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 73
    • View Profile
Row 0 filter for date columns pressing tab/enter
« on: September 15, 2017, 09:40:04 am »

Hi Team,

Currently in your Demo Row zero filter for date column implemented like if you press tab/Enter it will filter data.

This is working fine in chrome browser but in internet explorer it works for tab not from Enter button.

Can u suggest how we can resolve this.

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Row 0 filter for date columns pressing tab/enter
« Reply #1 on: September 18, 2017, 08:41:48 am »
it's because listener: 'change' binds the listener to change event. In IE change event doesn't fire on pressing enter.

1) One way to resolve this to use custom keydown listener:

Code: [Select]
listener: {'keydown': function(evt, ui){
if(evt.keyCode == $.ui.keyCode.ENTER || evt.keyCode == $.ui.keyCode.TAB){

this.filter({
rule: {condition: ui.column.filter.condition, dataIndx: ui.dataIndx, value: ui.value, value2: ui.value2 }
});
}
}}


2) Other easier way is to omit listener property at all which would use default timeout listener.

Note: the above solutions are for v4.
« Last Edit: September 18, 2017, 08:44:39 am by paramquery »