issue query only when sidebar is visible