We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given this component:
<template> <div> ComponentA </div> </template> <script lang="ts"> import Vue from 'vue' import { Component, Prop } from 'vue-property-decorator' @Component export default class ComponentA extends Vue{ @Prop({required:true}) val:number mounted(){ console.log('mounted') } } </script>
and a story:
.addDecorator(withKnobs) .add('one', () =>{ const val = number('val', 50, { range: true, min : -50, max : 50, step : 1, }) return { template: `<component-a :val="${val}"></component-a>` }
The vue instance re-mounts (logs 'mounted') when this knob slider is moved.
Is it expected that moving the number() slider should re-mount the component?
number()
I would have thought that just the property value should change??
The text was updated successfully, but these errors were encountered:
Hi I can confirm same thing happens when using button.
// "@storybook/addon-knobs": "^4.0.0-alpha.18", import { button } from '@storybook/addon-knobs' export default { template: '<div></div>', mounted () { console.log('mounted') button('click, this.click) }, methods: { click () { console.log('clicked') } } }
Each click re-mount and re-rendered the component. Any way to prevent re-mounting?
Sorry, something went wrong.
Hi, any updates on this?
There were a few similar issues regarding this. You can take a look on an attempt to solve this in #4516
No branches or pull requests
Given this component:
and a story:
The vue instance re-mounts (logs 'mounted') when this knob slider is moved.
Is it expected that moving the
number()
slider should re-mount the component?I would have thought that just the property value should change??
The text was updated successfully, but these errors were encountered: