Extend keys functionality
See original GitHub issueHi, 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:
- Could add slot to render key
- Could add a prop like
customValueFormatter
- 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:
- Created a year ago
- Comments:5 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
@leezng I have created PRs for both vue2 and vue3… Please review and let me know if any changes are needed