vue-styled-components icon indicating copy to clipboard operation
vue-styled-components copied to clipboard

Vuex HTML Input Value Field Jitter

Open WoofMeowEtc opened this issue 6 years ago • 1 comments
trafficstars

Hey. Thanks again for the awesome work here. I noticed that when I do:

<script>
	import styled from 'vue-styled-components';

	var MyInput = styled.input``;

	export default {
		components: {
			MyInput
		}
	}
</script>

<template>
	<MyInput
		type="range"
		min="0"
		max="100"
		defaultValue="0"
		:value="$store.state.brightness"
		@input="$store.commit('setBrightness', $event.target.value)"
	/>
</template>

The HTML slider loses its mind and jitters all over the place. It seems to be trying to snap to 0, 50, or 100. Very odd, but when I change MyInput to input the problem is solved, so I think this has to do with some interaction between vue-styled-components and vuex. Thoughts?

WoofMeowEtc avatar Jun 14 '19 12:06 WoofMeowEtc

Can you link me a code sandbox with an example?

liqueflies avatar Oct 06 '19 10:10 liqueflies