plantain-00 / schema-based-json-editor

A reactjs and vuejs component of schema based json editor.
MIT License
168 stars 38 forks source link

avoid displaying search box #16

Open shagabay opened 6 years ago

shagabay commented 6 years ago

hi,

is there any way to prevent search boxes from being displayed?

often times, they are not necessary and simply take up space.

hacks are also welcome :)

thanks sharon

plantain-00 commented 6 years ago

v7.14.0 added minItemCountIfNeedFilter, set it Infinity will hide the search box.

shagabay commented 6 years ago

UPDATE: i am starting to like the searchbox:)

in any case, i can't seem to make the new property work:

      <json-editor
          v-if="visible"
          :schema="schema"
          :initial-value="value"
          @update-value="updateValue($event)"
          theme="bootstrap4"
          icon="fontawesome4"
          minItemCountIfNeedFilter=9999>
      </json-editor>

package.json:

"vue-schema-based-json-editor": "^7.14.0",

thanks

On 24 April 2018 at 03:38, York Yao notifications@github.com wrote:

v7.14.0 added minItemCountIfNeedFilter, set it Infinity will hide the search box.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/plantain-00/schema-based-json-editor/issues/16#issuecomment-383765721, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDgeEoL3gIHBoZ6MtTiXiMFDOuzCrfnks5trnPugaJpZM4Tgw2- .

plantain-00 commented 6 years ago

minItemCountIfNeedFilter should be a number(not a string), so :minItemCountIfNeedFilter="9999"

shagabay commented 6 years ago

thanks! still didn't get it to work but will eventually..

fritz-net commented 3 years ago

I solved it by using the follwing code in my componets typescript: FilterCount: number = Infinity;

and in the vue html file I set it as property:

            <json-editor :schema="schema"
                         :initial-value="model"
                         @update-value="updateValue($event)"
                         theme="bootstrap4"
                         disableCollapse="true"
                         :minItemCountIfNeedFilter=FilterCount
                         >
            </json-editor>