Hi. I want to implement JavaScriptComponent extension. It should wrap Select2 component. I have also added some functionality i need.
Now I see a bug in my component: it brakes it presentation whenever invironment asks the component to resize, to become smaller. The component can’t become smaller as it contains chosen elements, that take more place.
So I suppose I need to refuse resizing on serverside logic, when layout sets my components width. I should override size setters and compare css size with server size, and reset the size to css if new size was smaller. In this case I have to know on serverside new size, which can be set with any sort of unit and translate it to pixels then. It seems as bad way to do. So can you plase suggest me the good one.
External resize events don’t change my components width and height properties. all resize actions a being performed on client side.
I hav added resize listener that asks server side to change size properties on serverside when components around try to resize my component.
connector.addResizeListener(element, selectChangeListener);