acsi-core 0.1.11 → 0.1.13
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.
- package/dist/components/CoreTextArea/index.d.ts +1 -0
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +18 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/sidebars/action.d.ts +1 -0
- package/dist/redux/sidebars/reducer.d.ts +4 -0
- package/package.json +1 -1
- package/dist/.DS_Store +0 -0
- package/dist/icons8-google-96~UAyNiMJa.svg +0 -1
- package/dist/layouts/TheLanguageDropdown.d.ts +0 -3
- package/dist/utils/icons.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -1489,13 +1489,22 @@ var CoreTextArea = function CoreTextArea(props) {
|
|
|
1489
1489
|
_props$tooltip = props.tooltip,
|
|
1490
1490
|
tooltip = _props$tooltip === void 0 ? '' : _props$tooltip,
|
|
1491
1491
|
_props$isOptional = props.isOptional,
|
|
1492
|
-
isOptional = _props$isOptional === void 0 ? false : _props$isOptional
|
|
1492
|
+
isOptional = _props$isOptional === void 0 ? false : _props$isOptional,
|
|
1493
|
+
minHeight = props.minHeight;
|
|
1494
|
+
var textareaRef = React.useRef(null);
|
|
1493
1495
|
var _useState = React.useState(false),
|
|
1494
1496
|
isOpenTooltip = _useState[0],
|
|
1495
1497
|
setIsOpenTooltip = _useState[1];
|
|
1496
1498
|
var toggleTooltip = function toggleTooltip() {
|
|
1497
1499
|
return setIsOpenTooltip(!isOpenTooltip);
|
|
1498
1500
|
};
|
|
1501
|
+
React.useEffect(function () {
|
|
1502
|
+
if (textareaRef.current) {
|
|
1503
|
+
var _textareaRef$current;
|
|
1504
|
+
textareaRef.current.style.height = "auto";
|
|
1505
|
+
textareaRef.current.style.height = ((_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 ? void 0 : _textareaRef$current.scrollHeight) + "px";
|
|
1506
|
+
}
|
|
1507
|
+
}, [value]);
|
|
1499
1508
|
return React__default.createElement("div", {
|
|
1500
1509
|
className: styles$8["core-text-area"],
|
|
1501
1510
|
style: {
|
|
@@ -1515,10 +1524,15 @@ var CoreTextArea = function CoreTextArea(props) {
|
|
|
1515
1524
|
isOpen: isOpenTooltip,
|
|
1516
1525
|
toggle: toggleTooltip
|
|
1517
1526
|
}, tooltip) : null), React__default.createElement("textarea", {
|
|
1527
|
+
ref: textareaRef,
|
|
1528
|
+
placeholder: placeholder,
|
|
1518
1529
|
style: {
|
|
1519
|
-
whiteSpace: "pre-wrap"
|
|
1530
|
+
whiteSpace: "pre-wrap",
|
|
1531
|
+
width: "100%",
|
|
1532
|
+
minHeight: minHeight ? minHeight : "123px",
|
|
1533
|
+
resize: "none",
|
|
1534
|
+
overflow: "hidden"
|
|
1520
1535
|
},
|
|
1521
|
-
placeholder: placeholder,
|
|
1522
1536
|
value: value,
|
|
1523
1537
|
cols: cols,
|
|
1524
1538
|
rows: rows,
|