Skip to content

Filter - askForReload - refreshOnChange when massAction #63

@benito103e

Description

@benito103e

When having a table with mass actions and checkboxes to select items.

On filling the filter we'll have a unexpected behaviour :

  1. Click on the filter field
  2. type something
  3. The result of the filter is displayed (refreshOnKeyup > askForReload)
  4. I check one row
  5. The table is reloaded a 2nd time : (refreshOnChange > askForReload)
  6. I loose my selection

A gullible solution would be to remove refreshOnChange for classic filters

{# @KilikTable/_columnFilter.html.twig #}
{% set column_filter_class = 'form-control refreshOnKeyup refreshOnChange' %}
{% if table.massActions and column.filter.options.choices is not defined %}
    {% set column_filter_class = 'form-control refreshOnKeyup' %}
{% endif %}

We miss CheckboxType and some other possibilies.

Perhaps an attribute to enable/disable refreshOnChange on \Kilik\TableBundle\Components\Filter would be preferable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions