vitmalina / w2ui

UI widgets for modern apps. Data table, forms, toolbars, sidebar, tabs, tooltips, popups. All under 120kb (gzipped).
http://w2ui.com
MIT License
2.66k stars 729 forks source link

w2ui grid 1.5v multiSelect false scroll grid keyboard down up no effect #1327

Open pidlo opened 8 years ago

pidlo commented 8 years ago

Hello, If i change value multisetect to false in grid,(by example in grid-23.html in demos) then i can select only one record but only with mouse, if i can do this with keyboard arrows down and up (selecting next row) there is no effect and i scroll inside frame with whole grid.

in 1.4 version i use this function in couple project fine in long datagrids

thanks for your job!

j1ng commented 7 years ago

+1 on this.

with multiSelect and reorderRows both set to false, onKeydown property doesn't work, as well as the keyboard navigation mentioned above btw grid rows.

from the code: (w2grid.js)

01

...

02

...

04

...

03

... the textarea#grid_{obj.name}_focus won't get focus thus listeners not triggered.

my temp workaround: tested w "Single or Multiple Selection" Demo

// assume grid name 'grid', as in the case of the demo page
var name = 'grid';
$(w2ui[name].box).mousedown(function(e){$(this).find('#grid_'+ name + '_focus').focus()});

(hope this can save your guys some time :p) Good Luck!