Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
schickm opened this issue Nov 5, 2015 · 1 comment
Open

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

schickm opened this issue Nov 5, 2015 · 1 comment

Comments

@schickm
Copy link

schickm commented Nov 5, 2015

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?

@shamberger
Copy link

+1

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

No branches or pull requests

2 participants