TrestleAdmin / trestle-search

Search plugin for the Trestle admin framework

Home Page:https://trestle.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom placeholders

Tao-Galasse opened this issue · comments

commented

Hi!

Would it be possible to define a custom placeholder for a search field ? It would allow you to have different placeholders on your different views, for example to describe the behaviour of each search bar.

Thank you !

You can use localizations to set a custom placeholder on a per-admin basis (or globally).

config/locales/en.yml:

en:
  admin:
    # Update placeholder everywhere
    search:
      placeholder: "Search by keyword..."

    # Update placeholder for a specific admin
    movies:
      search:
        placeholder: "Search movies..."