Sprig - Filter entries by custom field checkbox values, separate values as well as all values
My suggestion would be to give the Select All Values checkbox a unique name. That way, you can easily detect whether it was selected or not. You should also break dropdown_field out into 2 variables to avoid confusion.
{% set select_all_values = select_all_values ?? false

{% set dropdown_field_options = ['dropdown_value_1', 'dropdown_value_2', 'dropdown_value_3', 'dropdown_value_4', 'dropdown_value_5'] %}
{% set params = {section: 'section_1'} %}

{% if not select_all_values %}
    {% set params = params|merge({dropdown_field: dropdown_field} %}
{% endif %}

{% set entryQuery = craft.entries(params) %}


&lt;div s-replace=&quot;#results&quot;&gt;
    &lt;div&gt;
        &lt;input sprig type=&quot;checkbox&quot; name=&quot;select_all_values&quot; id=&quot;dropdown_value_all&quot; value=&quot;1&quot; {{ select_all_values ? 'checked disabled' : '' }}&gt;
        &lt;label for=&quot;dropdown_value_all&quot;&gt;
            Select All Values
        &lt;/label&gt;
    &lt;/div&gt;
    {% for value in dropdown_field_options %}
    &lt;div&gt;
        &lt;input sprig type=&quot;checkbox&quot; name=&quot;dropdown_field[]&quot; id=&quot;{{ value }}&quot; value=&quot;{{ value }}&quot; {{ value in dropdown_field ? 'checked' : '' }}&gt;
        &lt;label for=&quot;{{ value }}&quot;&gt;
            {{ value }}
        &lt;/label&gt;
    &lt;/div&gt;
    {% endfor %}
&lt;/div&gt;