From 2fe3162e7ff32fda555af3e5f72fc1759e95c25d Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Wed, 15 Nov 2023 14:10:54 +1100 Subject: [PATCH] use the right api calls to list records Signed-off-by: Steve Cassidy --- src/gui/components/notebook/add_record_by_type.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/notebook/add_record_by_type.tsx b/src/gui/components/notebook/add_record_by_type.tsx index ba1b404a4..b4db626f5 100644 --- a/src/gui/components/notebook/add_record_by_type.tsx +++ b/src/gui/components/notebook/add_record_by_type.tsx @@ -14,7 +14,7 @@ import {useEventedPromise, constantArgsSplit} from '../../pouchHook'; import {QRCodeButton} from '../../fields/qrcode/QRCodeFormField'; import { ProjectInformation, - getAllRecordsWithRegex, + getRecordsWithRegex, RecordMetadata, } from 'faims3-datamodel'; import {getProjectMetadata} from '../../../projectMetadata'; @@ -67,7 +67,7 @@ export default function AddRecordButtons(props: AddRecordButtonsProps) { const handleScanResult = (value: string) => { // find a record with this field value - getAllRecordsWithRegex(project_id, value).then(records => { + getRecordsWithRegex(project_id, value, true).then(records => { // navigate to it // what should happen if there are more than one? for (const key in records) {