Skip to content

Suggestion: change names of event #16

Open
@christophe-g

Description

@christophe-g

Because Polymer event (set in sortablejs.html) have the same name as in the native Sortable library,
a Polymer listener function would be called twice. What I usually do is to process the function only when event.detail exists :

listeners : {
  'sortable.add': 'onSortableAdd'
},

onSortableAdd: function(e) {
console.info('called twice');
if(e.detail) {
   doStuff
}

What about changing all event with a sortable- prefix (before too many people use this young library...)

Thanks anyway,
C.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions