KoGrid icon indicating copy to clipboard operation
KoGrid copied to clipboard

koGrid doesn't set checkbox properly -with code fix

Open ricred opened this issue 12 years ago • 13 comments

When trying to set checkbox the toggleSelected return undefined value, stopping the check event chain and thereby isn't the checkbox "visually set".

Fix for my particular problem was to make the following change (line 1109)

from: afterSelectionChange: function () { }, to: afterSelectionChange: function () { return true; },

since the return statement on line 1633: return self.afterSelectionChange(self, event); returns undefined without the "fix" and causing the mentioned problem.

ricred avatar Feb 07 '13 20:02 ricred

Thank you, it's working just perfect.

IvanSokalskyi avatar Mar 05 '13 20:03 IvanSokalskyi

Awesome, I just came across this post, and it solved my problem too! Thanks to ricred!!!!

anandsk123 avatar Mar 13 '13 18:03 anandsk123

Excellent! This fix made the difference between using the grid and not for our app. Thanks!

alecialene avatar Mar 18 '13 16:03 alecialene

Thanks fixed the problem. A JSFilddle to reproduce the problem http://jsfiddle.net/sudarshan89/m4z2z/10/

sudarshan89 avatar Mar 21 '13 07:03 sudarshan89

Thanks a lot! Why it is not in master yet?

kiaplayer avatar Apr 01 '13 06:04 kiaplayer

is there a way to apply this fix without modifying the source? like changing it after the lib is loaded?

ImaginaryDevelopment avatar Apr 12 '13 13:04 ImaginaryDevelopment

@ImaginaryDevelopment, I think you can fix it with config option:

 <div data-bind="koGrid: { data: items, afterSelectionChange: function () { return true; } }"></div>

Look at this: koGrid-2.1.1.debug.js, line 886

kiaplayer avatar Apr 16 '13 06:04 kiaplayer

yup thanks

ImaginaryDevelopment avatar Apr 16 '13 13:04 ImaginaryDevelopment

Thanks Kiaplayer. Works great.

steedums avatar Jun 24 '13 15:06 steedums

Thanks, your solution saved my day!

ZiadJ avatar Jun 25 '13 14:06 ZiadJ

and....... not in master yet!!!!!!! :(

Taguiar84 avatar Nov 22 '13 18:11 Taguiar84

Works! I try to bind checkbox's change event and it does not work :(

ctthang avatar Mar 07 '14 04:03 ctthang

Updated jsFiddle provided by @sudarshan89 http://jsfiddle.net/onh86fas/

crissdev avatar Mar 06 '15 08:03 crissdev