ink-text-input
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -13,2 +13,17 @@ "use strict"; | ||
}); | ||
react_1.useEffect(() => { | ||
setState(previousState => { | ||
if (!focus || !showCursor) { | ||
return previousState; | ||
} | ||
const newValue = originalValue || ''; | ||
if (previousState.cursorOffset > newValue.length - 1) { | ||
return { | ||
cursorOffset: newValue.length, | ||
cursorWidth: 0 | ||
}; | ||
} | ||
return previousState; | ||
}); | ||
}, [originalValue, focus, showCursor]); | ||
const cursorActualWidth = highlightPastedText ? cursorWidth : 0; | ||
@@ -15,0 +30,0 @@ const value = mask ? mask.repeat(originalValue.length) : originalValue; |
{ | ||
"name": "ink-text-input", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Text input component for Ink", | ||
@@ -54,3 +54,3 @@ "license": "MIT", | ||
"husky": "^4.2.5", | ||
"ink": "^3.0.0-3", | ||
"ink": "^3.0.5", | ||
"ink-testing-library": "^2.0.0", | ||
@@ -57,0 +57,0 @@ "prettier": "^2.0.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10567
162