[Column Filter] Cancelling filter pop-up

Forge Component
Published on 2014-10-22 by André Vieira
5 votes
Published on 2014-10-22 by André Vieira
It would be nice to have the filter pop-up dismissed when clicking outside of it. Alternatively, the clear button should always be shown, and clicking it dismisses the pop-up. Currently, the pop-up is there to stay when there's no filter yet and the button is clicked, until something is typed in. But if a user makes a mistake, there's no way to get rid of the pop-up.
Hi Killian,

You are right clicking outside does not close the popup. You can use ESC to close the popup.
Ok, thanks, I can inform the users about that at least. Still, if you ever plan a new version, it'd be nice if clicking outside the pop-up would work as well :).

SyntaxEditor Code Snippet

Hi Killian, I had the same issue and worked a solution by creating a dummy style "ColumnFilter_Container" to the widget top container(just an unique name to identify the control) and also added the below script to widget javascript.
$(document).on("click", function(e) {    
    $(".ColumnFilter_Container").each(function(i, container){
        // if the target of the click isn't the container...
        // ... nor a descendant of the container
        container = $(container);
        if (!container.is(e.target) && container.has(e.target).length === 0)