Expanding the Editor based on a Path #448
Replies: 2 comments 1 reply
-
The function In JavaScript, you can't compare the contents of arrays using import { isEqual } from 'lodash-es'
refEditor.current.expand((path) => {
return isEqual(path, []) ||
isEqual(path, ['processes']) ||
isEqual(path, ['processes', 'FIN_1'])
}) Now of course you'll need to write some logic to automatically expand each of the sub-paths. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry -
Should have replied - that worked great.
And did just what i wanted.
Thanks
Jonathan
Jonathan Bishop
MA PGDip
Principal Process Engineer
D +44 (0)1223 463947 T +44 (0)1223 463500 F +44 (0)1223 461007
***@***.******@***.***>
[cid:65e8e3b4-a3a7-4825-baf2-fe756ee65aa9]
Mott MacDonald
22 Station Road
Cambridge CB1 2JD
United Kingdom
Website<http://www.mottmac.com/> | Twitter<https://twitter.com/mottmacdonald> | LinkedIn<https://www.linkedin.com/company/7253> | Facebook<https://www.facebook.com/mottmacdonaldgroup> | YouTube<https://www.youtube.com/user/mottmacdonaldgroup>
Mott MacDonald Limited. Registered in England and Wales no. 1243967. Registered office: Mott MacDonald House, 8-10 Sydenham Road, Croydon CR0 2EE, United Kingdom
The information contained in this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient of this e-mail, the use of this information or any disclosure, copying or distribution is prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer.
Mott MacDonald Restricted
…________________________________
From: Jos de Jong ***@***.***>
Sent: Wednesday, June 26, 2024 07:45
To: josdejong/svelte-jsoneditor ***@***.***>
Cc: Jonathan Bishop ***@***.***>; Author ***@***.***>
Subject: Re: [josdejong/svelte-jsoneditor] Expanding the Editor based on a Path (Discussion #448)
Closed #448<#448> as resolved.
—
Reply to this email directly, view it on GitHub<#448>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJP6TFPRC5VROUPKIIP5E3DZJJPR7AVCNFSM6AAAAABJC24UWKVHI2DSMVQWIX3LMV45UABFIRUXGY3VONZWS33OIV3GK3TUHI5E433UNFTGSY3BORUW63R3GEZTKNZTGQ2A>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry - unfortunately I am confused.
I want to be able to expand the editor based on path. I can get it to expend based on the level but not the path.
I have looked here for examples but I cannot see one.
I thought I could do something like -
Beta Was this translation helpful? Give feedback.
All reactions