Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Bootstrap 4 #487

Open
gustawdaniel opened this issue Mar 1, 2018 · 0 comments
Open

Support for Bootstrap 4 #487

gustawdaniel opened this issue Mar 1, 2018 · 0 comments

Comments

@gustawdaniel
Copy link

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>
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant