institut-de-genomique / Ultimate-DataTable

This AngularJS directive generate a HTML table with build-in fonctionnality like save, edit, remove, pagination etc...
http://institut-de-genomique.github.io/Ultimate-DataTable/
45 stars 26 forks source link

Action mouseover #21

Closed Jenselme closed 8 years ago

Jenselme commented 8 years ago

Here is my proposal for action on mouseover. From the discussion here: https://github.com/institut-de-genomique/Ultimate-DataTable/issues/17#issuecomment-168680049

Tell me what you think.

galbini commented 8 years ago

Hi Julien,

Thanks for your pull request. It's possible to change the config param names to open configuration to other events ?

For example

mouseevent: {
       active: false,
       overCallback: undefined,  // used to have a callback when the user passes the mouse over a row.
       leaveCallback: undefined 
},

Best regards, Guillaume

Jenselme commented 8 years ago

@galbini Good idea. Should I also change the select option to a clickCallback in the moueevent section?

galbini commented 8 years ago

Yes, good idea but we need to keep the backward compatibility because i have several applications that used this feature.

Jenselme commented 8 years ago

Just rebased and proposed this modification. For the select section: I move the callback to mouseevents. The rest is left unchanged. Since this is new and not included in any releases yet, I don't think this is an issue. Let me know what you think.

galbini commented 8 years ago

The config mousevens.clickCallback is a new feature but select.callback already exists and i used it in my applications and i need to keep the backward compatibility.

the better way is the two parameters work together with first priority for select.callback.

Are you agree with this approach ?

Jenselme commented 8 years ago

select.callback already exists and i used it in my applications

OK, just submitted a commit to keep select.callback. I print a warning suggesting to use mouseevents.clickCallback instead.

galbini commented 8 years ago

Perfect Julien, I merge your pull request ASAP.