setQuery(e.target.value)}
+ autoFocus
+ ref={searchRef}
+ className="form-control"
+ data-testid="reference-picker-search"
+ />
+
+
+ {results.length === 0 ? (
+
+ {t('references_picker_empty_hint')}
+
+ ) : (
+ results.map((hit, index) => {
+ const key = hit._source.EntryKey
+ const { title = '', author = '', year = '', journal = '' } =
+ hit._source.Fields ?? {}
+ const meta = [
+ author,
+ author && year ? ` — ${year}` : year,
+ journal ? ` · ${journal}` : '',
+ ].join('')
+
+ return (
+
+ )
+ })
+ )}
+