Giter Site home page Giter Site logo

Comments (5)

paolosimone avatar paolosimone commented on July 19, 2024 1

Hi @originalrusyn , thanks as usual for your feedback!

It's a reasonable request, the solution I have in mind (#45) is allowing 3 search options:

Examples searching "owner" in https://api.github.com/users/paolosimone/repos , notice the top-right eye icon

Show all [new!]

It always shows the whole json and highlights matches.
Warn: since it doesn't filter anything you'll have to scroll down to find matches

image

Show subtree [default]

It shows matches and their subtree.

image

Show matches only

Only shows exact matches.

image


This feature will be available soon in v1.1.0 v1.1.1. I will also try to add a setting to customize the default visibility mode, but it needs further investigation (see #46).

Don't forget to star the project on github! ⭐

from virtual-json-viewer.

originalrusyn avatar originalrusyn commented on July 19, 2024

Hi @paolosimone
Thank for your answer.

Just to double check
The "Show subtree" setting will show all properties of first element (and hide other elements) of json array for https://api.github.com/users/paolosimone/repos when I search "Merry" because the occurrence of the searching word is belong to the first element ( like on screenshot below )?
image
If yes, that's what I want.
Thanks a lot.

from virtual-json-viewer.

paolosimone avatar paolosimone commented on July 19, 2024

The "Show subtree" setting will show all properties of first element

nope, the "Show subtree" is the current version's default, so it will behave like your original post. Also, since "Merry" matches the value and not the key, in this case "Show subtree" and "Show matches" behaves the same.

To do what you want you will have to switch to the new "Show all" mode that will:

  • collapse and fade all array items without search occurrences
  • expand items with search occurrences and keep its siblings

So searching "Merry" with "Show all" will output:

image

To give another example with a match on array item which is not the first, searching "Navidad" will output:

image

from virtual-json-viewer.

paolosimone avatar paolosimone commented on July 19, 2024

As a side note, I confirm that the default search mode will be customizable in settings

image

from virtual-json-viewer.

m-titov avatar m-titov commented on July 19, 2024

Ok,
Thanks

from virtual-json-viewer.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.