ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Unable to disable vertical Scroll [since v3.0.0-rc.20-89461bc]

Open jercoh opened this issue 10 years ago • 4 comments

This commit 89461bc broke the ability to disable vertical scrolling.

Last unstable version (NOT WORKING): http://plnkr.co/edit/k46LqpiBc1cesOP8xdIM?p=preview

Unstable version v3.0.0-rc.20-d4a784f - 2015-04-21 (WORKING): http://plnkr.co/edit/35szFnzVSPGinvzJgR8y?p=preview

Also, the scrolling cannot be disabled if the grid has already been scrolled.

jercoh avatar Apr 27 '15 18:04 jercoh

Hi,

Any update on this issue?

Thanks!

jercoh avatar May 04 '15 15:05 jercoh

@swalters: is this in your area?

PaulL1 avatar May 15 '15 23:05 PaulL1

All I can do is laugh. This (what should have been a) 2 minute job is going to be my life now.

mryellow avatar Nov 16 '23 01:11 mryellow

This solution is good.

Overloading atTop and atBottom so that this preventDefault() codepath is under your control again.

https://github.com/angular-ui/ui-grid/blob/8892f1d178669530a8db19c7a269fd00f88adb85/packages/core/src/js/directives/ui-grid-render-container.js#L106-L112

ScrollEvent.prototype.atTop = function(scrollTop) {
	return true;
};

ScrollEvent.prototype.atBottom = function(scrollTop) {
	return true;
};

https://stackoverflow.com/a/44020606/2438830

mryellow avatar Nov 16 '23 02:11 mryellow