DISABLED conditional display in the nestable slider element

Hi bricks team,

In version 1.8.5, the DISABLED setting for arrows was added in the nestable slider element and it is really a great option. But the point here is that the DISABLED options will have no use if the sliders are looped.
Therefore, it is much better to hide the DISABLED settings if Type is default (loop) in the nestable slider settings. Because as I mentioned, these settings cannot be used at all in loop mode.

Screenshot

Hey @jolia,

thanks for your request.

We won’t change anything here at this point as the user might choose the Custom options type. In this case we do not know the slider type and have to show the controls accordingly.

Best,

André

1 Like

I agree the setting should be hidden if “loop” type is selected, since it doesn’t do anything in those instances.

@jolia - if you’re looking for a workaround, I figured out some simple custom CSS that will hide the arrows when there is only 1 slide while in loop mode. The slider element has a class called “is-overflow” when there is more than 1 slide while in loop mode. So you can create a custom class that you apply to the slider element, and then target it like so hide the arrows:

.custom-slider-class:not(.is-overflow) .splide__arrows {
    opacity:0;
    display:none;
}

You can set opacity to 0, or display none, whatever works best for you workflow. (Someone can chime in if there are any accessibility issues to take into account)

1 Like