Use on:input

This commit is contained in:
rxdn 2023-07-17 20:52:15 +01:00
parent 093769171a
commit 32b8e74004
4 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<label class="form-label">{label}</label> <label class="form-label">{label}</label>
<WrappedSelect placeholder="Select panel..." items={panels} optionIdentifier="panel_id" nameMapper={labelMapper} <WrappedSelect placeholder="Select panel..." items={panels} optionIdentifier="panel_id" nameMapper={labelMapper}
bind:selectedValue={selectedRaw} on:change={update} on:clear={handleClear} {isMulti} {isSearchable} /> bind:selectedValue={selectedRaw} on:input={update} on:clear={handleClear} {isMulti} {isSearchable} />
<script> <script>
import {onMount} from "svelte"; import {onMount} from "svelte";

View File

@ -1,6 +1,7 @@
<Select {items} <Select {items}
bind:value={selectedValue} bind:value={selectedValue}
on:change on:change
on:input
on:clear on:clear
searchable={searchable} searchable={searchable}
clearable={isClearable} clearable={isClearable}

View File

@ -8,7 +8,7 @@
<div class="col-1"> <div class="col-1">
<WrappedSelect items={mentionItems} <WrappedSelect items={mentionItems}
bind:selectedValue={selectedMentions} bind:selectedValue={selectedMentions}
on:change={updateMentions} on:input={updateMentions}
optionIdentifier="id" optionIdentifier="id"
nameMapper={mentionNameMapper} nameMapper={mentionNameMapper}
placeholder="Select roles..." placeholder="Select roles..."
@ -19,7 +19,7 @@
<label class="form-label">Support Teams</label> <label class="form-label">Support Teams</label>
<WrappedSelect items={teamsWithDefault} <WrappedSelect items={teamsWithDefault}
bind:selectedValue={selectedTeams} bind:selectedValue={selectedTeams}
on:change={updateTeams} on:input={updateTeams}
optionIdentifier="id" optionIdentifier="id"
nameMapper={nameMapper} nameMapper={nameMapper}
placeholder="Select teams..." placeholder="Select teams..."
@ -129,7 +129,7 @@
optionIdentifier="id" optionIdentifier="id"
nameMapper={emojiNameMapper} nameMapper={emojiNameMapper}
placeholderAlwaysShow={true} placeholderAlwaysShow={true}
on:change={handleCustomEmojiChange} /> on:input={handleCustomEmojiChange} />
</div> </div>
{:else} {:else}
<EmojiInput col1=true bind:value={data.emote}/> <EmojiInput col1=true bind:value={data.emote}/>

View File

@ -23,7 +23,7 @@
<div class="col-1"> <div class="col-1">
<WrappedSelect isSearchable={false} isClearable={false} optionIdentifier="id" items={teams} placeholder="Select a team..." <WrappedSelect isSearchable={false} isClearable={false} optionIdentifier="id" items={teams} placeholder="Select a team..."
bind:selectedValue={activeTeam} nameMapper={labelMapper} bind:selectedValue={activeTeam} nameMapper={labelMapper}
on:change={updateActiveTeam}/> on:input={updateActiveTeam}/>
</div> </div>
</div> </div>