Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在ExtJS中滚动到表单末尾_Javascript_Extjs4 - Fatal编程技术网

Javascript 如何在ExtJS中滚动到表单末尾

Javascript 如何在ExtJS中滚动到表单末尾,javascript,extjs4,Javascript,Extjs4,我有一个具有自动滚动功能的表单。在向表单添加新项目时,如何滚动到表单底部 height: 200, autoScroll: true, 这是我的示例如果在表单末尾添加了字段,则以下解决方案可能会有所帮助: EXTJS 5和6 在表单config中: scrollable: true, 在按钮处理程序中: { xtype: 'button', itemId: 'addChildBtn', di

我有一个具有自动滚动功能的表单。在向表单添加新项目时,如何滚动到表单底部

 height: 200,
 autoScroll: true,

这是我的示例

如果在表单末尾添加了字段,则以下解决方案可能会有所帮助:

EXTJS 5和6

在表单config中:

scrollable: true,
在按钮处理程序中:

{
                xtype: 'button',
                itemId: 'addChildBtn',
                disabled: false,
                text: 'Clone fieldset',
                 handler: function () {
                // Clone field set 
                  var set = Ext.getCmp('s1');         
                 var s = set.cloneConfig();
                form.add(s);
                this.up('form').getScrollable().scrollTo(0, 9999);
                }
            }
{
                xtype: 'button',
                itemId: 'addChildBtn',
                disabled: false,
                text: 'Clone fieldset',
                 handler: function () {
                // Clone field set 
                  var set = Ext.getCmp('s1');         
                 var s = set.cloneConfig();
                form.add(s);
                this.up('form').scrollBy(0, 9999, true);
                }
            }
ExtJS4

在按钮处理程序中:

{
                xtype: 'button',
                itemId: 'addChildBtn',
                disabled: false,
                text: 'Clone fieldset',
                 handler: function () {
                // Clone field set 
                  var set = Ext.getCmp('s1');         
                 var s = set.cloneConfig();
                form.add(s);
                this.up('form').getScrollable().scrollTo(0, 9999);
                }
            }
{
                xtype: 'button',
                itemId: 'addChildBtn',
                disabled: false,
                text: 'Clone fieldset',
                 handler: function () {
                // Clone field set 
                  var set = Ext.getCmp('s1');         
                 var s = set.cloneConfig();
                form.add(s);
                this.up('form').scrollBy(0, 9999, true);
                }
            }