Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options.placeholderText does not work #9

Open
PetrusHahol opened this issue Feb 9, 2021 · 5 comments
Open

options.placeholderText does not work #9

PetrusHahol opened this issue Feb 9, 2021 · 5 comments

Comments

@PetrusHahol
Copy link

PetrusHahol commented Feb 9, 2021

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

@pimlie
Copy link
Member

pimlie commented Feb 10, 2021

@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?

@PetrusHahol
Copy link
Author

PetrusHahol commented Feb 10, 2021

@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
Copy link
Author

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

@svd-bug
Copy link

svd-bug commented Mar 15, 2021

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.

@PetrusHahol
Copy link
Author

It works fine with i18n module enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants