@medplum/react 0.9.8 → 0.9.11

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
@@ -1417,16 +1417,7 @@
1417
1417
  }
1418
1418
  return (React__default["default"].createElement(Autocomplete, { loadOptions: (input) => {
1419
1419
  return medplum
1420
- .search({
1421
- resourceType: resourceTypeRef.current,
1422
- filters: [
1423
- {
1424
- code: 'name',
1425
- operator: core.Operator.EQUALS,
1426
- value: input,
1427
- },
1428
- ],
1429
- })
1420
+ .search(resourceTypeRef.current, 'name=' + encodeURIComponent(input))
1430
1421
  .then((bundle) => bundle.entry.map((entry) => entry.resource));
1431
1422
  }, getId: (item) => {
1432
1423
  return item.id;
@@ -4567,7 +4558,7 @@
4567
4558
  React.useEffect(() => {
4568
4559
  setOutcome(undefined);
4569
4560
  medplum
4570
- .search(Object.assign(Object.assign({}, search), { total: 'accurate' }))
4561
+ .search(search.resourceType, core.formatSearchQuery(Object.assign(Object.assign({}, search), { total: 'accurate' })))
4571
4562
  .then((response) => {
4572
4563
  setState(Object.assign(Object.assign({}, stateRef.current), { searchResponse: response }));
4573
4564
  if (onLoad) {