Skip to content

Commit

Permalink
fix(input): input can be selected by type
Browse files Browse the repository at this point in the history
reflect `type` on host
add type on part

fixes: #40
  • Loading branch information
Sukaato committed Sep 29, 2024
1 parent f327937 commit 7bdd6db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pop-input,prop,required,boolean,undefined,false,true
pop-input,prop,size,"lg" | "md" | "sm" | "xs",undefined,false,true
pop-input,prop,spellcheck,boolean,undefined,false,false
pop-input,prop,step,string,undefined,false,false
pop-input,prop,type,"date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week",'text',false,false
pop-input,prop,type,"date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week",'text',false,true
pop-input,prop,value,number | string,'',false,false
pop-input,method,setFocus,setFocus() => Promise<void>
pop-input,event,popBlur,void,true
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class Input implements ComponentInterface {
/**
* The type of control to display. The default type is text.
*/
@Prop({ mutable: true }) type: InputType = 'text';
@Prop({ reflect: true, mutable: true }) type: InputType = 'text';

/**
* Instructional text that shows before the input has a value.
Expand Down Expand Up @@ -444,7 +444,7 @@ export class Input implements ComponentInterface {
>
<slot name="start" />
<input
part="native"
part={`native ${this.type}`}
id={inputId}
name={this.name}
type={this.type}
Expand Down

0 comments on commit 7bdd6db

Please sign in to comment.