All Apps and Add-ons

Sideview: How to change checkboxpulldown back to All Selected with a button without reloading the rest of the page?

snoobzilla
Builder

I have a chain of 7 checkbox pulldowns that is proving very useful. Is there a way I can change them back to all selected with a button or something to clear filters without reloading the rest of the page (and resetting upstream options)?

I just thought of one way... use a redirector/urlloader to reload page with same upstream options. Is there another cleaner way? The upstream searches are costly until I get my act together and implement summary indexing.

1 Solution

sideview
SplunkTrust
SplunkTrust

This was actually a bug in the CheckboxPulldown module, the fix for which just released in Sideview Utils 3.3

http://sideviewapps.com/apps/sideview-utils

Previously it would select all of the options the first time it rendered any, but later options that hadn't been in that first list wouldn't be selected. Several customers and questions on this site reported various forms of "i'm constantly having to click 'select all' cause things keep showing up unselected'.

You should be all set now - update Sideview Utils and of course let me know if you still have any trouble with the module.

View solution in original post

sideview
SplunkTrust
SplunkTrust

This was actually a bug in the CheckboxPulldown module, the fix for which just released in Sideview Utils 3.3

http://sideviewapps.com/apps/sideview-utils

Previously it would select all of the options the first time it rendered any, but later options that hadn't been in that first list wouldn't be selected. Several customers and questions on this site reported various forms of "i'm constantly having to click 'select all' cause things keep showing up unselected'.

You should be all set now - update Sideview Utils and of course let me know if you still have any trouble with the module.

snoobzilla
Builder

Thanks Nick! Working as expected now. Developer who liked the previous weird sticky behavior will have to live with normalcy and I won't have to explain it everyone else.

0 Karma

sansay
Contributor

Thank you Nick.
Being too busy, I forgot to post this: I found a way around this issue. I added a customBehavior method to the checkboxPulldown in which I called:
this.clearDynamicOptions();
This has worked perfectly. Every time the selection changed all the options are selected.
I now wonder if there will be some side effect with your fix.

sideview
SplunkTrust
SplunkTrust

No worries - I'll make a note to do that when the fix is posted. And... I can't really leave a boolean to do the old behavior cause the old implementation is really gone. The module used to do its bookkeeping around selections, when it really needed to do its bookkeeping by "deselections", which was the core of the problem. If you send me an email with full details (as full as you can), I can definitely think about it. nick [at] sideviewapps.com

0 Karma

snoobzilla
Builder

PS... sideview (aka Nick?) I can't promote your bug fix comment to an answer. If you do so I will mark it as such.

0 Karma

snoobzilla
Builder

Strangely enough, I am finding the current behavior useful... any chance you could make it an AllowClobber boolean param or something to turn it on? Default would be off. Thanks for fixing it either way!

Best regards, and thanks for Sideview too. It has been crucial in allowing me to build some really cool stuff.

0 Karma

sideview
SplunkTrust
SplunkTrust

update - I came to understand the root cause here (the me making this prior comments had not yet understood). And it's being fixed as a bug. As soon as the next maintenance release goes out - CheckboxPulldown will be fixed, in that all options that it has never seen before will be checked. The buggy behavior prior was "it selects all by default, but only the first time it sees anything". Should be up in a day or two. I'll try and post back but I might forget.

0 Karma

sansay
Contributor

How interesting!
I am just struggling with the same issue.
I have 3 pulldown controls preceding the CheckboxPulldown. Everytime I change a selection in any of the pulldowns, the options change in the CheckboxPulldown, but if the elements didn't exist previously they are not selected. Which sometimes results in a search failure because the controls has nothing selected. So I would prefer that, anytime there is a change of options, they are all selected.

0 Karma

snoobzilla
Builder

Hmmm... not a programmer or admin so a little leery of going the js direction.

It seems like this would be a nice option though but I can see how it would be kind of difficult to implement. Whatever switch is 'make me stick' would have to become a boolean. Then upstream module could be switch for that parameter.

Or is this another case where the pull must be from downstream so there would be a clear gate above and destination gate below to make it pull?

0 Karma

sideview
SplunkTrust
SplunkTrust

Yea.. I've been tinkering with this and ruminating. I've tried out some different ideas including a crazy idea involving the Gate module.

However this actually is a case where you either need to write a little custom JS, or I need to put some core functionality into CheckboxPulldown itself. I can't quite see a sensible way to do the latter yet but I can help with the former. If you don't mind owning a little code in application.js I can write up such an answer.

0 Karma

snoobzilla
Builder

Still struggling with this one... redirector/urlloader are clunky for this use case.

CheckBoxPulldowns are very nice, but it seems like there is some stickiness outside of my control. For the purposes I am using it for, the stickiness is useful, but I also need to be able turn it off to reset the analysis enabled by the stickiness.

0 Karma

snoobzilla
Builder

All the ones I want to reset are dynamic. There are some static regular pulldowns upstream.

0 Karma

sideview
SplunkTrust
SplunkTrust

Are they static or dynamic CheckboxPulldown modules or a mix of the two?

0 Karma
Get Updates on the Splunk Community!

BSides Splunk 2022 - The Call for Papers is now Open!

TLDR; Main Site: https://bsidessplunk.com CFP Site: https://bsidessplunk.com/cfp CFP Opens: December 15th, ...

Sending Metrics to Splunk Enterprise With the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

What's New in Splunk Cloud Platform 9.0.2208?!

Howdy!  We are happy to share the newest updates in Splunk Cloud Platform 9.0.2208! Analysts can benefit ...