Fixed minor things, cleaned up some code
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {defineElement, render, CustomElement, Host} from "../../../packages/csx-custom-elements";
|
||||
import {defineElement, render, CustomElement, Host, State} from "../../../packages/csx-custom-elements";
|
||||
import style from './todo-input.scss';
|
||||
|
||||
@defineElement('todo-input')
|
||||
export class TodoInput extends CustomElement{
|
||||
value = "";
|
||||
@State() value = "";
|
||||
|
||||
render(){
|
||||
return (
|
||||
@@ -27,7 +27,7 @@ export class TodoInput extends CustomElement{
|
||||
this.dispatchEvent(new CustomEvent('submit', {
|
||||
detail: this.value
|
||||
}));
|
||||
this.state = "";
|
||||
this.value = "";
|
||||
};
|
||||
handleInput = ({target: {value}})=>{
|
||||
this.value = value;
|
||||
|
||||
Reference in New Issue
Block a user