extjs6

Flow layout with nested container

﹥>﹥吖頭↗ 提交于 2019-12-11 02:07:00
问题 In my Ext JS 6 app, I'm trying to create a flow layout with 3 containers, with the middle container having nested items that need to continue with the flow layout. I can get this working if I add the middle container's items directly, but I don't want to do that... I want them to be separate. Here's an example: Ext.application({ name: 'Fiddle', launch: function () { Ext.create('Ext.panel.Panel', { height: 300, width: 300, scrollable: true, renderTo: Ext.getBody(), title: 'Not properly working

ExtJS - How to pass Component config options to XTemplates?

你说的曾经没有我的故事 提交于 2019-12-10 22:59:01
问题 I defined a following class extending Ext.view.View: Ext.define('Aft.view.comments.CommentsList', { extend: 'Ext.view.View', xtype: 'comments-list', parameter: false, tpl: new Ext.XTemplate( '<tpl for=".">', ' <div class="comment">', // some code here ' <div class="fault">', ' <tpl if="this.parameter">', // some code also here ' </tpl>', ' </div>', ' </div>', '</tpl>', { strict: true, // other methods and fields }), initComponent: function() { this.config = Ext.apply({}, this.config); this

ExtJS 6 plugin.rowwidget Get binded record upon row body component creation

别等时光非礼了梦想. 提交于 2019-12-10 18:53:35
问题 I have a grid with Ext.grid.plugin.RowWidget. When I expand row I have to load some data via ajax using row record data as request parameters and display loaded data in a row body component. How I can get row record data upon row body component creation? I've tried initComponent and afterrender listener, but I understand that it is not appropriate place because data is not binded yet. I have to listen for another event or? Here is simple fiddle illustrating my problem and what I've tried

ExtJS 6 Use custom filter function within memory proxy

纵然是瞬间 提交于 2019-12-10 18:07:33
问题 I have a store configured with memory proxy with enablePaging: true . Store's remoteFilter and remoteSort set to true so filtering and sorting requests handled by proxy. When I filter my store by multiple fields I want to use OR condition, not AND. Without memory proxy paging I could use remoteFilter: false and custom filter function like: store.filterBy(function (record) { for (var i = 0; i < searchFields.length; ++i) { if (record.get(searchFields[i]).toLowerCase().indexOf(searchText) !== -1

ExtJS 6 grid group by associated models

可紊 提交于 2019-12-10 16:02:26
问题 Context A while ago I used this answer to implement remote sorting and filtering. Using the format 'associatedModel.associatedModelField', I could easily resolve the expression in my server side code in order to query the database. Problem While this does the job, I encountered another problem with grouping - which I have configured to be local - the associated models . If I group a column which displays an associated field, I cannot collapse or expand without errors. Doing the same thing for

Load app.js before rest of application

ⅰ亾dé卋堺 提交于 2019-12-10 15:43:32
问题 I'm trying to figure out how I can load app.js before allowing the user to get the actual application. What I'm attempting to do is load a user's configuration file before all of my class Ext.defines fire... the reason I want to do this is because the Ext.defines actually depend on values in the user's configuration. So for example, in an Ext.define, I could have the title property set to pull from this global user configuration var. And no, I don't want to have to go through and change all

ExtJS 6.x Modern Button as a Link

断了今生、忘了曾经 提交于 2019-12-08 13:29:04
问题 On menu items you are able to optionally add either a handler to handle press or mouseclick events or specify and href configuration so that when the menu is simply a link. { text: 'Example Ext Menu Item', iconCls: 'x-fa fa-cog', href: 'https://www.google.com' } For the Ext.Button (Modern) how can you have the button act as a link while still supporting the other features of a button (icons, on hover etc). For example I would like to be able to "right click" on any area of the button and

Multiple row select ExtJS

谁都会走 提交于 2019-12-08 04:05:42
问题 I have grid with RowSelectionModel: selModel: { selType: 'rowmodel', mode: 'MULTI' } How to select many rows in grid? Now I can select only one record with me.getViewModel().get('record') : var me = this; // Ask user to confirm this action Ext.Msg.confirm('Confirm Delete', 'Are you sure you want to delete this asset_objects?', function(result) { // User confirmed yes if (result == 'yes') { var record = me.getViewModel().get('record'), store = Ext.StoreManager.lookup('asset_objects'); //

How to use logical operators inside bind formulas in ExtJS?

a 夏天 提交于 2019-12-07 01:26:30
问题 I have 3 input fields in a form and want to make the third input enabled only when the first two inputs have values. This doesn't seem to work: Ext.define('MyApp.view.myobj.MyPanel', { extend:'Ext.Panel', viewModel: {}, items: [{ xtype: 'form', defaultType: 'textfield', items: [ {fieldLabel: 'Field 1', reference: 'field1', publishes: 'value'}, {fieldLabel: 'Field 2', reference: 'field2', publishes: 'value'}, { fieldLabel: 'Field 3', bind: { disabled: '{!field1.value} || {!field2.value}' } },

In ExtJs 6.2, a column that contains an item does not take into account its flex property, is there a workaround?

孤者浪人 提交于 2019-12-06 18:58:28
In ExtJs 6.2, there is a bug described here in the Sencha Forum . Since 6.2+ Ext.grid.Panel ignores flex when using column items. Steps to reproduce the problem: Create a grid in fiddle with 6.2+ Add columns without items and flex:1 klick run in fiddle and it looks just fine Add a item to the column with flex:1 klick again run in fiddle an flex wil get ignored! The result that was expected: I would expect the column to flex. The result that occurs instead: The column will render in the minimum size. The thread says this be corrected in the nightly build, but ExtJs 6.2.1 is not yet available in