Skip to content

Instantly share code, notes, and snippets.

@jenswittmann
Created August 1, 2018 07:32
Show Gist options
  • Save jenswittmann/d7f178c58c73fff8e01fb1fd86d83c79 to your computer and use it in GitHub Desktop.
Save jenswittmann/d7f178c58c73fff8e01fb1fd86d83c79 to your computer and use it in GitHub Desktop.
MODX Collections update TV from grid
collections.combo.TVNAME = function(config) {
config = config || {};
Ext.applyIf(config,{
store: new Ext.data.SimpleStore({
fields: ['v']
,data: [
['val1'],
['val2'],
['val3']
]
})
,displayField: 'v'
,valueField: 'v'
,mode: 'local'
,value: 'original'
,triggerAction: 'all'
,editable: false
,selectOnFocus: false
,preventRender: true
,forceSelection: true
,enableKeyEvents: true
});
collections.combo.TVNAME.superclass.constructor.call(this,config);
};
Ext.extend(collections.combo.TVNAME,MODx.combo.ComboBox);
Ext.reg('collections-combo-TVNAME',collections.combo.TVNAME);
@jenswittmann
Copy link
Author

No perfect at all, but for now it works for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment