Feature reqest : Add a callback in redraw.
Closed this issue · 2 comments
bratanon commented
There would be good with a callback executed after the result element is .show() and .hide().
I.E
// Finally show/hide based on focus and emptiness
if (($input.is(':focus') || focus) && !$results.is(':empty')) {
$results.filter(':hidden').show() // Show if hidden
.scrollTop($results.data('scroll-top')); // Reset the lost scrolling
AFTERSHOW CALLBACK HERE
}
else if ($results.is(':visible')) {
// Store the scrolling position for later
$results.data('scroll-top', $results.scrollTop())
.hide(); // Hiding it resets it's scrollTop
AFTERHIDE CALLBACK HERE
}
betamos commented
Looks neat. I'll look into it.