Skip to content

Filter text clears on state change #81

@darkestmon

Description

@darkestmon

To replicate:

  1. Create a multiselect with filter
  2. Add a setState on onChange
  3. Run
  4. Write something on the filter box
  5. Click an item
    Expected: multiselect should still be filtered
    What happens: filter is cleared and multiselect lists all items

I'm guessing since the setState forces a render of the component, the filter box is back to default empty state.

Tried a work around stated in the bootstrap-multiselect site:
http://davidstutz.de/bootstrap-multiselect/#further-examples

$('#file-box-wrapper li.multiselect-filter input').val(this.filterKeyword).trigger('keydown');

text is placed in the filterbox but it does not update the list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions