New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object grid filters on all relation fields #3031
Comments
For this we need to implement an own filter type (based on https://docs.sencha.com/extjs/6.2.1/classic/Ext.grid.filters.filter.Base.html) which opens the field layout in a modal window (as batch editing does). ExtJS does not provide an "action filter" or anything like that. Or we use a string filter with a focus event. The filter panel appears if you enter the following to abstractRelations.js: getGridColumnFilter: function (field) {
return {
type: 'string',
dataIndex: field.key,
itemDefaults: {
listeners: {
'focus': function() {
var filter = this;
var tag = new pimcore.object.tags[field.type](null, field.layout);
var win = new Ext.Window({
autoScroll: true,
modal: false,
bodyStyle: "background: #fff;",
width: 500,
maxHeight: 400,
});
var formPanel = Ext.create('Ext.form.Panel', {
xtype: "form",
border: false,
items: [tag.getLayoutEdit()],
bodyStyle: "padding: 10px;",
buttons: [
{
text: t("filter"),
handler: function() {
if(formPanel.isValid()) {
filter.setValue(JSON.stringify(formPanel.getValues()));
this.close();
}
}.bind(win)
}
]
});
win.add(formPanel);
win.show();
win.updateLayout();
}
}
}
};
}, But I have not found a way to set the value to the filter. The variable "filter" in the above code is only the text input field, not the filter. And instantiating a Ext.grid.filters.filter.String object also fails because the grid does not exist yet. |
duplicate of #699 |
Improvement
It would be great if in object grid have filters available for all the relation fields - Object relation, Object with metadata, Href, Multi-href, Multi-href advanced. The same interface can be used that is being used for Batch Update in object grid, in addition to that if AND/OR operator can be handled. Please refer following screen
The text was updated successfully, but these errors were encountered: