How to use TextArea/TextField?
I can't figure out how to react to changes when using TextArea or TextField.
I would have expected bind:value to work
<TextArea fullwidth bind:value />
<script>
import { TextArea } from "svelte-material-components";
export default {
data () {
return {
value: "Hello World"
}
},
onstate () {
let { value } = this.get()
console.log(value)
},
components: {
TextArea
}
}
</script>
Or at the very least on:change
<TextArea fullwidth {value} on:change="set({ value: this.value })" />
But neither change the value.
Hey.
Actually none of that work because the actual components don't implement any way to access the value or to react to changes on the value...
I think you can set the value, but no get it from the component..so..yeah. I would recommend you to check if MCW has some way to get/set that value (last time I read that they were trying to decouple the components from HTML itself..), and if you want send a PR to this project..
Personally, I've already gave up because of all the breaking changes that MCW was done recently (there's a lot of them), so probably you would want to guarantee that none of the components you use break with the current version of MCW (I think the version pinned on package.json of this project is already quite old compared to the latest MCW version..). Sorry for that. :(