Skip to content

Default hooks not applying when only one uihook is specified #5

Description

@schickm

If I only specify a 'move', then the default insert and remove hooks are never called.

Template.listDetail.uihooks({
    '.item': {
        container: '.item-list',
        move: function onMove(node, next) {
            $(node).animate({
                height: 'toggle',
                opacity: 'toggle',
            }, 250).promise().done(() =>{
                $(node).insertBefore(next).animate({
                    height: 'toggle',
                    opacity: 'toggle',
                }, 250);
            });
        },
    },
});

Is this desired behavior? I imagine not....The issue seems to be that the generated wrappers around the passed in hooks return true even if a user specified hook isn't present, thus the defaultCallback never executes.

Will you accept a pull request fixing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions