Needs work
Project:
Search API Autocomplete
Version:
8.x-1.x-dev
Component:
General code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Nov 2018 at 08:27 UTC
Updated:
22 Jun 2023 at 19:12 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
aliyakhan commentedComment #3
aliyakhan commentedComment #4
mikemadison commentedApplies cleanly, works with config, and seems to function overall. Nice feature!
Comment #6
aliyakhan commentedComment #7
drunken monkeyFirst off, thanks a lot for posting this!
However, it’s kind of a lot of extra code for this small feature – which also isn’t really related at all to this module’s functionality, as far as I can see? I mean, you could have such a “Clear search” (or, in general, “Clear input”) button without any autocomplete functionality, too, right?
So maybe have this as a Views extension module instead (or as part of an existing one)? Or what’s your reasoning behind wanting it in this module?
Also, when the tests fail, just setting back to “Needs review” doesn’t really make sense. You should instead try to resolve the test fail – in this case, simply changing the
if ($options['clear_search']) {toif (!empty($options['clear_search'])) {should do it.Comment #8
yannickooFYI I was just creating a new merge request for #3368795: Use search form element instead of text for using
input[type="search"]instead ofinput[type="text"]. The cool thing about that is that a clear button comes OOTB and could be hidden via CSS if people don't want that.