cars10 / vue-print-object

A vuejs component to print javascript objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to display collapsed by default?

sinanerdem opened this issue · comments

Is there a possibility to display the objects collapsed by default?

Hi, great idea. I just published version 0.1.1 where you can do exactly that.

You can set a new prop named initial-collapsed when using the component. Set the prop to true to collapse all keys by default, set an array (for example ['key1', 'key2'] to only collapse specific keys.

Thank you!

I just tried the latest version. It works. One minor issue: when the objects have no name, it is impossible to open them. Look at the second object on the attached screenshot. There is no clickable area on that second array.

screen shot 2018-07-20 at 15 01 25

Yes, this is a known issue. I opened #2 for that and will later look into it.

Just wanted to let you know that i fixed this issue in 0.1.3.

Tried 0.1.3 and everything seems to work ok. thank you very much.