-
13 Feb 2012 5:58 PM #1
textarea's maxRows is of no effect
textarea's maxRows is of no effect
i want a textareafield to show 20 lines text, so i set the maxRows: 20, but only 4 lines text is visible. the code is as following:
app.js
Single.jsCode:Ext.Loader.setConfig({ enabled: true}); Ext.application({ name: "Test", views:[ 'Single' ], launch: function() { Ext.create('TestDriver.view.Single'); } });
Code:Ext.define('Test.view.Single', { extend: 'Ext.form.Panel', xtype: 'single', requires: [ 'Ext.form.FieldSet' ], config: { fullscreen: true, layout: 'fit', items: [ { xtype: 'fieldset', layout: 'vbox', labelAlign: 'left', labelWidth: '40%', items:[{ xtype: 'textareafield', id: 'textarearequestdata', maxRows: 20, cls: 'TextAreaBorder' }] }] } });
-
13 Feb 2012 6:12 PM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
This was a bug that should be fixed in Beta 3.
-
13 Feb 2012 6:22 PM #3
Jamie Avins, thanks for your quick reply, i see.
-
14 Feb 2012 5:40 PM #4
-
14 Feb 2012 6:23 PM #5
Very strange. This was definitely fixed, but somehow the code got removed. Sorry about that!
Here is a quick override to fix the issue for now:
Code:Ext.define('Ext.overrides.field.InputMaxRows', { overrides: 'Ext.field.Input', applyMaxRows: function(maxRows) { if (maxRows !== null && typeof maxRows !== 'number') { throw new Error("Ext.field.Input: [applyMaxRows] trying to pass a value which is not a number"); } return maxRows; } });Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.


Reply With Quote