mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
Fix resizable for TextArea #PL-2564
This commit is contained in:
parent
a7c373e663
commit
805a6e66d7
@ -13,8 +13,9 @@ public interface ResizableTextArea extends TextArea {
|
||||
|
||||
String NAME = TextArea.NAME;
|
||||
|
||||
boolean isResizable();
|
||||
/** Note: TextArea with fixed rows or cols can not be resizable */
|
||||
void setResizable(boolean resizable);
|
||||
boolean isResizable();
|
||||
|
||||
public void addResizeListener(ResizeListener resizeListener);
|
||||
public void removeResizeListener(ResizeListener resizeListener);
|
||||
|
@ -41,6 +41,17 @@ public class CubaResizableTextArea extends CubaTextArea {
|
||||
getState().resizable = resizable;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void beforeClientResponse(boolean initial) {
|
||||
super.beforeClientResponse(initial);
|
||||
|
||||
if (getState(false).rows > 0 && getState(false).columns > 0) {
|
||||
// TextArea with fixed rows or cols can not be resizable
|
||||
getState().resizable = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void addResizeListener(ResizeListener resizeListener) {
|
||||
if (!listeners.contains(resizeListener))
|
||||
listeners.add(resizeListener);
|
||||
|
Loading…
Reference in New Issue
Block a user