Closed nstuyvesant closed 3 years ago
Hi, you have to bind to the Input's inner
prop, Svelte won't understand bind:this with custom components:
<script>
import { Input } from 'sveltestrap';
let inner = undefined;
// call inner.focus()
</script>
<Input bind:inner />
Oh... sorry about that and thanks for the correction!
SvelteStrap: 5.6.1 Bootstrap: 5.1.0 Svelte: 3.42.1 SvelteKit: v1.0.0-next.147
Was calling focus() when the Modal opens and it was working with a standard HTML input. When I switched it to SvelteStrap's Input component, I started getting an error:
Here's the code up to that input with the HTML input (that worked) commented out: