@medplum/react 0.10.1 → 0.10.2

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/cjs/index.js CHANGED
@@ -1644,6 +1644,11 @@
1644
1644
  const [value, setValue] = React.useState(defaultValue ? core.getDisplayString(defaultValue) : '');
1645
1645
  const [loading, setLoading] = React.useState(false);
1646
1646
  const [data, setData] = React.useState([]);
1647
+ React.useEffect(() => {
1648
+ if (defaultValue) {
1649
+ setValue(core.getDisplayString(defaultValue));
1650
+ }
1651
+ }, [defaultValue, setValue]);
1647
1652
  function loadValues(input) {
1648
1653
  return __awaiter(this, void 0, void 0, function* () {
1649
1654
  setLoading(true);