question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend keys functionality

See original GitHub issue

Hi, thanks for the great project…

I am looking to add some functionality that is not currently supported. I want to be able to distinguish different JSON key s… I want to do something like this…

<div @mousedown="onMouseDown">
   <vue-json-pretty :data="{ key: {test:  'value' } }"> </vue-json-pretty>
</div>
onMouseDown(e) {
  if (e.target.classList.contains('vjs-key')) {
    console.log(e.dataset.path); // ["key"]["test"] if clicking on test key
  }
}

There’s a few different approaches to do this:

  1. Could add slot to render key
  2. Could add a prop like customValueFormatter
  3. Could add native support for this in the library

Happy to contribute implementation of this if we can agree on an approach

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
leezngcommented, Aug 24, 2022

@mutdmour Thanks for your PR, it looks very nice. I like this feature. I have some suggestions before merging that you can take a look.

1reaction
mutdmourcommented, Aug 23, 2022

@leezng I have created PRs for both vue2 and vue3… Please review and let me know if any changes are needed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Function Key Extension for the Standard Computer Keyboard
Function Key Extension for the Standard Computer Keyboard · Maintain the data for a device of the type PC Cash Keyboard (System ->...
Read more >
Can I extend the "sticky key" function to the "fn"
Hi,. Sticky key function is only available for SHIFT, CTRL, ALT, and Windows Logo keys. Sticky key option sets Sticky Keys to run...
Read more >
Fn + F8: What does the Extend option do? - YouTube
This video briefly explains to teachers how to utilize the Extend option for projecting, after pressing the Fn+F8 keys.
Read more >
Extend javascript key pressed function - Stack Overflow
I've a such a small javascript on my website, to control the site by pressing the arrow keys on my keyboard. ... If...
Read more >
Select text with the Extend Selection keyboard shortcut | ZDNET
Word's Extend Selection keyboard shortcut can help you make these selections more ... To select a line, press the up or down arrow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found