Vue-devtools: Would love editable props

Created on 20 Apr 2018  路  9Comments  路  Source: vuejs/vue-devtools

What problem does this feature solve?

Lot's of times I would like to see quick changes when a prop is changed, but most of the time the props getting sent in are hard coded. I would love to be able to change props on the fly as well as data.

What does the proposed API look like?

Make props editable the same way that data is editable.

feature request medium

Most helpful comment

This would be very useful for me since I often need to inspect the styling of a dropdown in dev tools but it closes when I click anywhere. I need to be able to switch a true/false prop to keep it open.

All 9 comments

褍芯u can edit data (which is passed as prop to your component) in parent component.

I understand that, but most of the time i'm not setting those props with a variable from data.

I think editing props shouldn't be added as a feature to devtools because following warning will be thrown every time:

[Vue warn]: Avoid mutating a prop directly since the value will be 
overwritten whenever the parent component re-renders. Instead, 
use a data or computed property based on the prop's value.

But feel free to test it yourself
chrome.zip

  1. Download and extract chrome.zip to chrome
  2. Open Chrome extension page
  3. Check "developer mode"
  4. Click "load unpacked extension", and choose chrome.

maybe as an option? :D
"Enable Prop manipulation*"
or something

@cannap We'll have to wait until we have the settings tab #547

@emanuelmutschlechner what are the plan for #547, it actually looks pretty dead.

This is an interesting feature so we could directly test an individual component is behaving correctly when a prop is changed just like how we could manipulate an attribute of a Web Component.

This would be very useful for me since I often need to inspect the styling of a dropdown in dev tools but it closes when I click anywhere. I need to be able to switch a true/false prop to keep it open.

This is a great feature, I just used it for testing a component I'm making. Thanks for adding it :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ispal picture ispal  路  4Comments

yyx990803 picture yyx990803  路  3Comments

stiltet picture stiltet  路  3Comments

phromo picture phromo  路  4Comments

davestewart picture davestewart  路  3Comments