{# Code for toggle and margin is compatible with bootstrap4 and bootstrap5 #}
{% if view.column_settings %}
<details class="dropdown" hx-target="#table_data">
    <summary>Columns</summary>
    <ul>
     {% for column in table.column_states %}
         <li>
             <label>
        <input type="checkbox" name="_col_{{ column.0 }}"  id="id_col_{{ column.0 }}" value="solid" hx-get="" />
                 {{ column.1 }}
      </label>
         </li>

    {% endfor %}
    </ul>
    {% if default %}
      <a class="dropdown-item py-0" href="#" hx-get="" id="id_col_reset">Reset columns</a>
      <div class="dropdown-divider"></div>
    {% endif %}

  </summary>
</details>
{% endif %}