-
Notifications
You must be signed in to change notification settings - Fork 157
fix(RefinementList): allow overriding of searchable placeholder #576
Conversation
Also noticed that the test was broken for `searchable`, so fixed that one too. New prop: placeholder on `RefinementList` fixes #572
@@ -25,6 +25,7 @@ Name | Type | Default | Description | Required | |||
---|---|---|---|--- | |||
attribute | string | | The attribute to refine on click | yes | |||
searchable | boolean | `false` | You can also search within the options of this | no | |||
placeholder | string | "Search here …" | If searchable is `true`, this will be the placeholder for that search box | no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placeholder is a bit broad in the context of a RefinementList. Why not searchablePlaceholder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We indeed call this searchablePlaceholder
in InstantSearch.js 3 (see new options).
@@ -121,6 +124,11 @@ export default { | |||
type: Boolean, | |||
default: false, | |||
}, | |||
searchablePlaceholder: { | |||
default: 'Search here…', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not part of the RefinementList spec yet, I'm not sure we want a default placeholder here?
In InstantSearch.js 3 it's "Search..."
for now but I would rather go without any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there will always be a placeholder since we use ais-search-box, we should probably spec it
also, go back to rest 👨⚕️
…lia/vue-instantsearch#576) * fix(RefinementList): allow overriding of searchable placeholder Also noticed that the test was broken for `searchable`, so fixed that one too. New prop: placeholder on `RefinementList` fixes algolia/vue-instantsearch#572 * Update RefinementList.md * chore: searchablePlaceholder
Also noticed that the test was broken for
searchable
, so fixed that one too.New prop:
searchable-placeholder
onais-refinement-list
fixes #572