PDA

View Full Version : [CLOSED] TagField shape of the header of the combo changed



FpNetWorth
Jan 21, 2014, 7:59 AM
Dear support.
I am willing to use the Basic TagField.
however in your examples, when i add all the tags in the combo and type a few more, the header of the combo changes shape.
any suggestion?

here is a snap


7517

thanks

Vladimir
Jan 21, 2014, 11:21 AM
Trigger doesn't support various height
Can you explain how the trigger should be looked when second line is added to the field?

Vladimir
Jan 21, 2014, 11:41 AM
I can suggest the following solution
Set the following Change handler for TagField


function onChange(field) {
if (field.rendered) {
var td = field.el.down("td.x-trigger-cell");
if (td.getHeight() > 25) {
field._color = td.getStyle("border-bottom-color");
td.setStyle("border-bottom-width", 0);


td.down("div").setStyle({
"border-bottom-width" : "1px",
"border-bottom-style" : "solid",
"border-bottom-color" : field._color
});
}
else if (field._color) {
td.down("div").setStyle("border-bottom-width", "0px");


td.setStyle({
"border-bottom-width" : "1px",
"border-bottom-color" : field._color
});


delete field._color;
}
}
}

Daniil
Jan 21, 2014, 12:20 PM
The fix has been committed to the SVN trunk in revision #5614.

Thank you for the report!