fix title of typeahead in framer

This commit is contained in:
Jon McClure 2022-09-07 13:06:36 +01:00
parent 445018167d
commit ffd678307e

View file

@ -68,17 +68,18 @@
</div> </div>
<Typeahead <Typeahead
label="Select an embed" label="Select an embed"
value="{embedTitles[0]}" value="{embedTitles[embeds.indexOf(activeEmbed)]}"
extract="{(d) => embedTitles[d.index]}" extract="{(d) => embedTitles[d.index]}"
data="{embeds.map((embed, index) => ({ index, embed }))}" data="{embeds.map((embed, index) => ({ index, embed }))}"
placeholder="{'Search'}" placeholder="{'Search'}"
showDropdownOnFocus="{true}" showDropdownOnFocus="{true}"
on:select="{({ detail }) => { on:select="{({ detail }) => {
if (typeof window !== 'undefined') if (typeof window !== 'undefined') {
window.localStorage.setItem( window.localStorage.setItem(
'framer-active-embed', 'framer-active-embed',
detail.original.embed detail.original.embed
); );
}
activeEmbed = detail.original.embed; activeEmbed = detail.original.embed;
}}" }}"
/> />