@agility/plenum-ui 1.3.15 → 1.3.16

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/lib/index.js CHANGED
@@ -12469,6 +12469,12 @@ var TextInput = function (_a, ref) {
12469
12469
  var _d = React.useState(false); _d[0]; var setIsActive = _d[1];
12470
12470
  var _e = React.useState(externalValue || defaultValue || ""), value = _e[0], setValue = _e[1];
12471
12471
  var inputRef = React.useRef(null);
12472
+ React.useEffect(function () {
12473
+ //if the external value is updated by the parent component, reset the value in here...
12474
+ if (externalValue !== undefined && externalValue !== null) {
12475
+ setValue(externalValue);
12476
+ }
12477
+ }, [externalValue]);
12472
12478
  // set force focus
12473
12479
  React.useEffect(function () {
12474
12480
  var input = inputRef.current;