lol forgot to link the datalist

This commit is contained in:
Lim Chee Aun 2023-02-16 18:37:57 +08:00
parent 73e8bed5f0
commit 74a02ee388

View file

@ -336,9 +336,14 @@ function ShortcutForm({ type, lists, followedHashtags, onSubmit }) {
name={name} name={name}
placeholder={placeholder} placeholder={placeholder}
required={type === 'text'} required={type === 'text'}
list={
currentType === 'hashtag'
? 'followed-hashtags-datalist'
: null
}
/> />
{currentType === 'hashtag' && followedHashtags.length > 0 && ( {currentType === 'hashtag' && followedHashtags.length > 0 && (
<datalist> <datalist id="followed-hashtags-datalist">
{followedHashtags.map((tag) => ( {followedHashtags.map((tag) => (
<option value={tag.name} /> <option value={tag.name} />
))} ))}