mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 10:28:14 +00:00
ui: storage content view: add clear trigger to search
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1d8306e4ca
commit
c8a71b9e1f
@ -288,21 +288,41 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
width: 200,
|
width: 200,
|
||||||
enableKeyEvents: true,
|
enableKeyEvents: true,
|
||||||
|
emptyText: gettext('Name, Format'),
|
||||||
listeners: {
|
listeners: {
|
||||||
buffer: 500,
|
keyup: {
|
||||||
keyup: function(field) {
|
buffer: 500,
|
||||||
store.clearFilter(true);
|
fn: function(field) {
|
||||||
store.filter([
|
store.clearFilter(true);
|
||||||
{
|
store.filter([
|
||||||
property: 'text',
|
{
|
||||||
value: field.getValue(),
|
property: 'text',
|
||||||
anyMatch: true,
|
value: field.getValue(),
|
||||||
caseSensitive: false
|
anyMatch: true,
|
||||||
}
|
caseSensitive: false,
|
||||||
]);
|
},
|
||||||
}
|
]);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
change: function(field, newValue, oldValue) {
|
||||||
|
if (newValue !== this.originalValue) {
|
||||||
|
this.triggers.clear.setVisible(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
triggers: {
|
||||||
|
clear: {
|
||||||
|
cls: 'pmx-clear-trigger',
|
||||||
|
weight: -1,
|
||||||
|
hidden: true,
|
||||||
|
handler: function() {
|
||||||
|
this.triggers.clear.setVisible(false);
|
||||||
|
this.setValue(this.originalValue);
|
||||||
|
store.clearFilter();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let availableColumns = {
|
let availableColumns = {
|
||||||
|
Loading…
Reference in New Issue
Block a user