fix(time-picker): use native binding for value prop (#1344)

This commit is contained in:
metonym 2022-06-12 08:09:43 -07:00 committed by GitHub
commit b21718ccfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 57 deletions

View file

@ -11,12 +11,6 @@
*/
export let value = "";
/**
* Specify the input type
* @type {string}
*/
export let type = "text";
/** Specify the input placeholder text */
export let placeholder = "hh:mm";
@ -88,14 +82,14 @@
{/if}
<input
bind:this="{ref}"
bind:value
type="text"
data-invalid="{invalid || undefined}"
pattern="{pattern}"
placeholder="{placeholder}"
maxlength="{maxlength}"
id="{id}"
name="{name}"
type="{type}"
value="{value}"
disabled="{disabled}"
{...$$restProps}
class:bx--time-picker__input-field="{true}"
@ -104,9 +98,6 @@
class:bx--text-input--invalid="{invalid}"
on:change
on:input
on:input="{({ target }) => {
value = target.value;
}}"
on:keydown
on:keyup
on:focus