Skip to content

Commit

Permalink
fix(svelte): fix ListInput children error
Browse files Browse the repository at this point in the history
fixes #48
  • Loading branch information
nolimits4web committed May 16, 2022
1 parent 1eab884 commit 2b91a6c
Showing 1 changed file with 74 additions and 38 deletions.
112 changes: 74 additions & 38 deletions src/svelte/components/ListInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -194,45 +194,81 @@
<slot name="input" />
{:else}
<!-- svelte-ignore a11y-autofocus -->
<svelte:element
this={InputComponent}
id={inputId}
bind:this={inputEl}
class={c.input[labelStyleIsFloating]}
style={inputStyle}
{name}
type={needsType ? type : undefined}
{placeholder}
{inputmode}
{size}
{accept}
{autocomplete}
{autocorrect}
{autocapitalize}
{spellcheck}
{autofocus}
{autosave}
{disabled}
{max}
{maxlength}
{min}
{minlength}
{step}
{multiple}
{readonly}
{required}
{pattern}
{tabindex}
{value}
on:input={onInput}
on:change={onChange}
on:focus={onFocusInternal}
on:blur={onBlurInternal}
>
{#if type === 'select'}
{#if type === 'select'}
<svelte:element
this={InputComponent}
id={inputId}
bind:this={inputEl}
class={c.input[labelStyleIsFloating]}
style={inputStyle}
{name}
type={needsType ? type : undefined}
{placeholder}
{inputmode}
{size}
{accept}
{autocomplete}
{autocorrect}
{autocapitalize}
{spellcheck}
{autofocus}
{autosave}
{disabled}
{max}
{maxlength}
{min}
{minlength}
{step}
{multiple}
{readonly}
{required}
{pattern}
{tabindex}
{value}
on:input={onInput}
on:change={onChange}
on:focus={onFocusInternal}
on:blur={onBlurInternal}
>
<slot />
{/if}
</svelte:element>
</svelte:element>
{:else}
<svelte:element
this={InputComponent}
id={inputId}
bind:this={inputEl}
class={c.input[labelStyleIsFloating]}
style={inputStyle}
{name}
type={needsType ? type : undefined}
{placeholder}
{inputmode}
{size}
{accept}
{autocomplete}
{autocorrect}
{autocapitalize}
{spellcheck}
{autofocus}
{autosave}
{disabled}
{max}
{maxlength}
{min}
{minlength}
{step}
{multiple}
{readonly}
{required}
{pattern}
{tabindex}
{value}
on:input={onInput}
on:change={onChange}
on:focus={onFocusInternal}
on:blur={onBlurInternal}
/>
{/if}
{/if}

{#if clearButton}
Expand Down

0 comments on commit 2b91a6c

Please sign in to comment.