question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot set searchBox options.cssClasses.input

See original GitHub issue

I’m getting error when trying to set the options.cssClasses.input on searchBox widget.

Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': 
The token provided ('ais-search-box--input form-control') contains HTML space characters, 
which are not valid in tokens.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wojtekmieszczakcommented, Jan 11, 2016
searchBoxWidget = instantsearch.widgets.searchBox(
    container: '.app-search'
    wrapInput: true
    autofocus: true
    cssClasses:
        root: 'input-group'
        input: 'form-control'
)

Just noticed that problem also occurs with root class. Other widgets css classes works fine.

0reactions
wojtekmieszczakcommented, Jan 13, 2016

It works now, @vvo . Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

searchBox | InstantSearch.js - Algolia
The searchBox widget is used to let the user perform a text-based query. This usually is the main entry point to start the...
Read more >
Search input with an icon Bootstrap - css - Stack Overflow
The only way I can think of is to add font-awesome icon and then set the positioning to absolute, right? But I'm not...
Read more >
Place Autocomplete | Maps JavaScript API - Google Developers
Autocomplete adds a text input field to your web page, and monitors that ... SearchBox offers fewer options than Autocomplete for restricting the...
Read more >
Search | API Reference | ArcGIS Maps SDK for JavaScript 4.25
Indicates whether to display the option to search all sources. more details, Search. searchTerm, String. The value of the search box input text...
Read more >
The Divi Search Module | Elegant Themes Documentation
Enter optional CSS classes to be used for this module. A CSS class can be used to create custom CSS styling. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found