fix(time-picker-select): change select to selectValue

This commit is contained in:
Eric Liu 2019-12-31 16:18:43 -08:00
commit be094b9096
3 changed files with 29 additions and 29 deletions

View file

@ -1,21 +1,21 @@
<script>
let className = undefined;
export { className as class };
export let value = '';
export let autofocus = false;
export let type = 'text';
export let small = false;
export let placeholder = '';
export let labelText = '';
export let closeButtonLabelText = 'Clear search input';
export let size = small ? 'sm' : 'xl';
export let light = false;
export let id = Math.random();
export let labelText = '';
export let light = false;
export let placeholder = '';
export let size = small ? 'sm' : 'xl';
export let small = false;
export let style = undefined;
export let type = 'text';
export let value = '';
import Search16 from 'carbon-icons-svelte/lib/Search16';
import Close16 from 'carbon-icons-svelte/lib/Close16';
import Close20 from 'carbon-icons-svelte/lib/Close20';
import Search16 from 'carbon-icons-svelte/lib/Search16';
import { cx } from '../../lib';
let inputRef = undefined;
@ -25,7 +25,7 @@
class={cx('--search', size && `--search--${size}`, light && '--search--light', className)}
{style}>
<Search16 class={cx('--search-magnifier')} />
<label for={id} class={cx('--label')}>{labelText}</label>
<label class={cx('--label')} for={id}>{labelText}</label>
<!-- svelte-ignore a11y-autofocus -->
<input
bind:this={inputRef}
@ -43,13 +43,13 @@
{placeholder} />
<button
type="button"
aria-label={closeButtonLabelText}
class={cx('--search-close', value === '' && '--search-close--hidden')}
on:click
on:click={() => {
value = '';
inputRef.focus();
}}
aria-label={closeButtonLabelText}>
}}>
<svelte:component this={size === 'xl' ? Close20 : Close16} />
</button>
</div>