@appquality/unguess-design-system 2.11.11 → 2.11.12
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v2.11.12 (Thu Sep 08 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- feat(input-toggle): add auto focus props [#88](https://github.com/AppQuality/unguess-design-system/pull/88) ([@marcbon](https://github.com/marcbon))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v2.11.11 (Thu Sep 08 2022)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
package/build/index.js
CHANGED
|
@@ -1537,9 +1537,15 @@ var IconContainer$1 = styled__default["default"].div(templateObject_6$2 || (temp
|
|
|
1537
1537
|
* - To enter multiline text, use a Textarea
|
|
1538
1538
|
**/
|
|
1539
1539
|
var InputToggle = function (props) {
|
|
1540
|
-
var
|
|
1540
|
+
var validation = props.validation, size = props.size, label = props.label, message = props.message, required = props.required, onBlur = props.onBlur, placeholder = props.placeholder, endIcon = props.endIcon, style = props.style, isFocused = props.isFocused, rest = __rest(props, ["validation", "size", "label", "message", "required", "onBlur", "placeholder", "endIcon", "style", "isFocused"]);
|
|
1541
|
+
var _a = React.useState(isFocused), isEditing = _a[0], setIsEditing = _a[1];
|
|
1541
1542
|
var inputRef = React.useRef(null);
|
|
1542
|
-
|
|
1543
|
+
React.useEffect(function () {
|
|
1544
|
+
var _a;
|
|
1545
|
+
if (isFocused) {
|
|
1546
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1547
|
+
}
|
|
1548
|
+
}, []);
|
|
1543
1549
|
var onClick = function () {
|
|
1544
1550
|
var _a;
|
|
1545
1551
|
setIsEditing(true);
|