FlexGrid scroll adding new item scroll bug
This is a demostration about a bug.
HTML
<script src="https://cdn.grapecity.com/wijmo/5.20212.812/controls/wijmo.min.js"></script>
<link rel="stylesheet" href="https://cdn.grapecity.com/wijmo/5.20212.812/styles/wijmo.min.css">
<script src="https://cdn.grapecity.com/wijmo/5.20212.812/controls/wijmo.grid.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<div class="contenedor">
<span>Press until exceed scroll size:</span>
<button onclick="addItem()">
Add item
</button>
<div id="FlexGrid"></div>
</div>
CSS
#FlexGrid {
height: 200px;
}
JavaScript
//Instance of CollectionView:
let view = new wijmo.collections.CollectionView();
//Instance of FlexGrid:
let flexGrid = new wijmo.grid.FlexGrid('#FlexGrid', {
columns: [
{ header: 'Column 1', binding: 'f1' },
{ header: 'Column 2', binding: 'f2' },
],
itemsSource: view // <--- bind to collectionView
});
//If the the last item is selected, then you add a new item,
//the scroll doestn't go at the bottom completely.
//You can try without bootstrap(CSS), and the result is the same.
let addItem = function() {
view.addNew({f1: 'Data1', f2: 'Data2'});
}