From e452fe454825c6740ea198c13d694dd70525b5ed Mon Sep 17 00:00:00 2001 From: srikant Date: Fri, 27 Dec 2024 00:55:24 +0530 Subject: [PATCH 1/2] #2283 Custom Controls do not take up full width when there is an action button on right (#2284) --- .../components/control-item/control-item.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/canvas_modules/common-canvas/src/common-properties/components/control-item/control-item.scss b/canvas_modules/common-canvas/src/common-properties/components/control-item/control-item.scss index 126f97b45..a49539aa5 100644 --- a/canvas_modules/common-canvas/src/common-properties/components/control-item/control-item.scss +++ b/canvas_modules/common-canvas/src/common-properties/components/control-item/control-item.scss @@ -39,6 +39,10 @@ .properties-ci-action-item { display: flex; justify-content: space-between; + + .properties-ci-content-container { + flex-grow: 1; + } } .properties-label-container { From 687f337104a237c89862104fe7777bf66cee3baf Mon Sep 17 00:00:00 2001 From: srikant Date: Thu, 2 Jan 2025 18:18:11 +0530 Subject: [PATCH 2/2] #2264 Common Properties Button is hidden on height change (#2265) Signed-off-by: srikant --- .../properties-main/properties-main.jsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/canvas_modules/common-canvas/src/common-properties/properties-main/properties-main.jsx b/canvas_modules/common-canvas/src/common-properties/properties-main/properties-main.jsx index e16128334..26b8d8ad4 100644 --- a/canvas_modules/common-canvas/src/common-properties/properties-main/properties-main.jsx +++ b/canvas_modules/common-canvas/src/common-properties/properties-main/properties-main.jsx @@ -101,6 +101,8 @@ class PropertiesMain extends React.Component { this.detectResize = this.detectResize.bind(this); // used to tracked when the resize button is clicked and ignore detectResize this.resizeClicked = false; + // Track panel height to avoid resize calls whenever height changes + this.lastPanelHeight = 0; } componentDidMount() { @@ -455,12 +457,15 @@ class PropertiesMain extends React.Component { } } - detectResize() { - // only hide resize button if resize wasn't from clicking resize button - if (!this.resizeClicked) { - this.setState({ showResizeBtn: false }); + detectResize(_width, height) { + if (height === this.lastPanelHeight) { + // only hide resize button if resize wasn't from clicking resize button + if (!this.resizeClicked) { + this.setState({ showResizeBtn: false }); + } + this.resizeClicked = false; } - this.resizeClicked = false; + this.lastPanelHeight = height; } render() {