lunr-module icon indicating copy to clipboard operation
lunr-module copied to clipboard

options.placeholderText does not work

Open PetrusHahol opened this issue 4 years ago • 5 comments

Hi Whatever I use as placeholderText is not being used as placeholder for input. In source of a page the placeholder is empty.

    {
      src: "@nuxtjs/lunr-module",
      options: {
        placeholderText: "SearchTest"
      },
    },

Here its substituted. But here used as empty.

I do not use I18N

PetrusHahol avatar Feb 09 '21 17:02 PetrusHahol

@PetrusHahol Could you check the lunr plugin file in your nuxt build dir and see if a default value has been set? Path should be eg src/.nuxt/lunr/plugin.js

Does it work when you add a placeholder attribute on the search component?

pimlie avatar Feb 10 '21 11:02 pimlie

@pimlie In my src/.nuxt/lunr I have only two files. icon-search.svg and search.vue. and if to put some placaholder value in search component, yes it works. You can have a look how it works here.( Push the search button and lunr search will appear. )

PetrusHahol avatar Feb 10 '21 12:02 PetrusHahol

okay, I probably got what you mean by Does it work when you add a placeholder attribute on the search component?. So actually this way

   <lunr-search :style="navSearchLunrStyle"
                       placeholder="Search"
                       class="search"
          >

It also does not work

PetrusHahol avatar Feb 10 '21 14:02 PetrusHahol

Hi, guys. Are there any updates about this issue? I work on the same project mentioned above. I was successful to see placeholder text only in dev mode. I open the web page to reproduce it, then add placeholder text to the page code and then see the text in the search bar. It stays there up to the page refresh. Then placeholder attribute switches back to empty.

Maybe you will find it useful.

svd-bug avatar Mar 15 '21 17:03 svd-bug

It works fine with i18n module enabled.

PetrusHahol avatar Mar 23 '21 20:03 PetrusHahol