Skip to content

Support for Bootstrap 4 #487

Description

@gustawdaniel

In bootstrap 4 filtering looks like this

This is because lack of backward compatibility between bootstrap.

Following after docs

https://getbootstrap.com/docs/4.0/components/button-group/

New code of filter should looks like this

<div id="datatable-editable-filter" class="input-group">
            <div class="input-group-prepend">
                <div class="input-group-text">
                    <i class="fa fa-filter"></i>
                </div>
            </div>
            <input class="reactive-table-input form-control" type="text" placeholder="Filter">
        </div>

Now code looks like this and works in bootstrap 3.

<div id="datatable-editable-filter" class="input-group">
    <span class="input-group-addon">
        <i class="fa fa-filter"></i>
    </span>
        <input class="reactive-table-input form-control" type="text" placeholder="Filter">
  </div>

I propose add number of bootstrap to config and in dependence of this change code.

Now I applied hack:

document.querySelector('#datatable-editable-filter span.input-group-addon').outerHTML = `
             <div class="input-group-prepend">
                <div class="input-group-text">
                    <i class="fa fa-filter"></i>
                </div>
            </div>
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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