@topconsultnpm/sdkui-react-beta 6.9.38 → 6.9.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,7 +64,7 @@ export const StyledEditorLabel = styled.div `
64
64
  `;
65
65
  export const StyledTextareaEditor = styled.textarea `
66
66
  width: ${props => props.$width};
67
- padding: 5px 5px 5px 13px;
67
+ padding: 4px 4px 5px 13px;
68
68
  border: 1px solid;
69
69
  border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
70
70
  border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid;
@@ -80,6 +80,8 @@ const TMTextArea = (props) => {
80
80
  };
81
81
  // Calculate the number of rows required to display the content
82
82
  const calculateRows = (content) => {
83
+ if (content === undefined || content.length === 0)
84
+ return 1;
83
85
  if (!inputRef.current)
84
86
  return rows ?? 1;
85
87
  const textareaWidth = inputRef.current.offsetWidth;
@@ -137,6 +139,7 @@ const TMTextArea = (props) => {
137
139
  }, "$isMobile": deviceType === DeviceType.MOBILE, "$maxHeight": maxHeight, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$width": width, "$resize": resize }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: '6px', top: label.length > 0 ? '20px' : '7px', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [showClearButton && currentValue &&
138
140
  _jsx(StyledTextAreaEditorButton, { onClick: () => {
139
141
  onValueChanged?.({ target: { value: undefined } });
142
+ setCurrentValue('');
140
143
  setCalculatedRows(1);
141
144
  onBlur?.(undefined);
142
145
  }, children: _jsx(IconClearButton, {}) }), buttons.map((buttonItem, index) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.9.38",
3
+ "version": "6.9.40",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",