Skip to content

Conversation

@crazyjat
Copy link

Change how setDragDisable works to support multiple grids on one page with different drag settings for each grid.

Change how setDragDisable works to support multiple grids on one page with different drag settings for each grid.
Copy link
Contributor

@skrajewski skrajewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @crazyjat,

Thank you for your contribution! I'm glad that someone is willing to improve this plugin :) I have done a review for you. It will be nice if you fix it because it doesn't work as expected.

Kind regards,
Szymon


onDragStartEventListener: function(e) {
if (uiGridDraggableRowsSettings.dragDisabled || (hasHandle && !handle)) {
if (this.dragDisabled || (hasHandle && !handle)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this in this place is DOM node

dragndrop: {
setDragDisabled: function setDragDisabled(status) {
uiGridDraggableRowsSettings.dragDisabled = ~~status;
this.dragDisabled = ~~status;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this in this place is single grid object, but in my opinion, it's better to keep dragDisabled state inside the plugin instead of performing modification in main grid itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants