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

headerFilterPlaceholder doesn't work if the field refers nested property #921

Closed
hhsprings opened this Issue Feb 25, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@hhsprings

hhsprings commented Feb 25, 2018

<html>
<head>
<meta>

<link rel="stylesheet"
 href="https://cdnjs.cloudflare.com/ajax/libs/tabulator/3.4.3/css/tabulator_site.min.css">
<script type="text/javascript"
 src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript"
 src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript"
 src="https://cdnjs.cloudflare.com/ajax/libs/tabulator/3.4.3/js/tabulator.min.js"></script>

</head>
<body>
<div id="my-table">
</div>
<script>
var data1 = [];
var i = 0;
for (i = 0; i < 30; ++i) {
    data1.push({nested: {index: i + 1}, name: i + 50000});
}
$("#my-table").tabulator({
    "columns": [
        {
            "field": "nested.index",
            "title": "index",
            "width": "100",
            "headerFilter": "input",
            "headerFilterFunc": "<=",
            "headerFilterPlaceholder": "<=",
        },
        {
            "field": "name",
            "title": "name",
            "width": "100",
            "headerFilter": "input",
            "headerFilterFunc": "<=",
            "headerFilterPlaceholder": "<=",
        },
    ],
    "tooltips": true,
    "tooltipsHeader": true,
    "layout": "fitColumns",
    "height": "400",
    "data": data1,
});
</script>
</body>
</html>

In this "nested.index" case, headerFilterPlaceholder seems to be ignored.

@olifolkerd olifolkerd self-assigned this Feb 25, 2018

@olifolkerd olifolkerd added question bug and removed question labels Feb 25, 2018

@olifolkerd

This comment has been minimized.

Owner

olifolkerd commented Feb 25, 2018

Hey @hhsprings

Good spot! thanks for letting me know.

I have just pushed a fix for this to the master branch and will be including it in todays patch release.

Cheers

Oli :)

@olifolkerd olifolkerd closed this Feb 25, 2018

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