PDA

View Full Version : [CLOSED] [4.2.1 GA] Grid + BufferedRenderer: inconsistent selection after insertion of record



Daniil
24 Sep 2013, 8:53 PM
REQUIRED INFORMATION

Ext version tested:

Ext 4.2.1 GA

Browser versions tested against:

Chrome
IE9

DOCTYPE tested against:

<!DOCTYPE html>

Description:

A grid is configured with a BufferedRenderer. If scroll and insert a record, selection behavior gets inconsistent. Mostly, it selects a row adjacent to clicked one.
It may be related to this: http://www.sencha.com/forum/showthread.php?272367

Steps to reproduce the problem:

Scroll to the middle
Click the Insert button
Click any row

The result that was expected:

The clicked row gets selected

The result that occurs instead:

The clicked row doesn't get selected
An adjacent row gets select or/and some scrolling happens

Test Case:
https://fiddle.sencha.com/#fiddle/lt


<!DOCTYPE html>
<html>
<head>
<title>Grid with BufferedRenderer - inconsistent selection behavior after insertion of record</title>

<link rel="stylesheet" href="../resources/css/ext-all.css" />

<script src="../ext-all-dev.js"></script>

<script>
Ext.onReady(function () {
var testData = [],
i,
grid;

for (i = 0; i < 5000; i++) {
testData.push({ test: "test" + i});
}

Ext.create("Ext.button.Button", {
renderTo: Ext.getBody(),
text: "Insert",
handler: function () {
grid.getStore().insert(0, { test: "new" });
}
});

grid = Ext.create("Ext.grid.Panel", {
renderTo: Ext.getBody(),
height: 300,
store: {
pageSize: 5000,
model: Ext.define("TestModel", {
extend: "Ext.data.Model",
fields: [{
name: "test"
}]
}),
data: testData
},
columns: [{
text: "Test",
dataIndex: "test"
}],
plugins: {
ptype: "bufferedrenderer"
}
});
});
</script>
</head>
<body>

</body>
</html>

Gary Schlosberg
25 Sep 2013, 9:48 AM
Thanks for the report! I have opened a bug in our bug tracker.