ensureVisible and scrollToRecord function dont work.
Does ExtJS7 has any solutions for viewing latest record?Code:const listView = this.lookup( 'ListOrGridView' ) const record = store.last() listView.scrollToRecord( record )
ensureVisible and scrollToRecord function dont work.
Does ExtJS7 has any solutions for viewing latest record?Code:const listView = this.lookup( 'ListOrGridView' ) const record = store.last() listView.scrollToRecord( record )
When are you executing this code as it may be too soon. For example, here is a simple example using some local data and some buttons (with and without animation) where it does work:
Mitchell Simoens @LikelyMitch
Check out my GitHub:
https://github.com/mitchellsimoens
Posts are my own, not any current, past or future employer's.
thank you for your answer!!
but i am sorry, not enough words.
```
variableHeights: true,
infinite: true,
```
this config was needed.
ex.)
just added these configs.
(sorry for i dont know to attach a fiddle link...)
https://fiddle.sencha.com/#fiddle/2v8p&view/editor
thank youCode:Ext.application({ name : 'Fiddle', launch : function() { Ext.Viewport.add({ xclass: 'Ext.dataview.List', variableHeights: true, infinite: true, itemTpl: '<div>{i}</div>', store: { data: ((i, length) => { const data = []; while (i < length) { data.push({ i }); i++ } return data; })(0, 1000) }, items: [ { xclass: 'Ext.Toolbar', docked: 'top', items: [ { xclass: 'Ext.Button', text: 'Scroll To First', handler (btn) { const list = btn.up('list'); const checkbox = list.down('checkbox'); const record = list.getStore().first(); list.scrollToRecord(record, checkbox.getChecked()); } }, { xclass: 'Ext.Button', text: 'Scroll To Last', handler (btn) { const list = btn.up('list'); const checkbox = list.down('checkbox'); const record = list.getStore().last(); list.scrollToRecord(record, checkbox.getChecked()); } }, { xclass: 'Ext.field.Checkbox', checked: true, boxLabel: 'Animation?' } ] } ] }); } });
Yea, the updated code worked up to 6.7 but broke with 7.0. I've logged a request to open a bug.
For embedding fiddles, do something like:
[FIDDLE]2v8p[/FIDDLE]
and the forum will swap that out for the embed.
Mitchell Simoens @LikelyMitch
Check out my GitHub:
https://github.com/mitchellsimoens
Posts are my own, not any current, past or future employer's.
Thank you so much!
They opened EXTJS-28662 to track this.
Mitchell Simoens @LikelyMitch
Check out my GitHub:
https://github.com/mitchellsimoens
Posts are my own, not any current, past or future employer's.