Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Searchbox: limit to 512 characters #510

Closed
Haroenv opened this issue Oct 20, 2017 · 3 comments · Fixed by #542
Closed

Searchbox: limit to 512 characters #510

Haroenv opened this issue Oct 20, 2017 · 3 comments · Fixed by #542

Comments

@Haroenv
Copy link
Contributor

Haroenv commented Oct 20, 2017

Do you want to request a feature or report a bug?

bit of both

Bug: What is the current behavior?

Search interface accepts input over 512 character, but the engine does not

Bug: What is the expected behavior?

The interface to limit the search query

The workaround for now is to use the connectSearchBox and manually trimming the input or not allowing longer input

Feature: What is your proposed API entry? The new option to add? What is the behavior?

no option to add, just limit the input box

What is the version you are using? Always use the latest one before opening a bug issue.

4.1.3

@vvo
Copy link
Contributor

vvo commented Oct 21, 2017

Can we dig also the usecase behing this request? While having a maximum on the input is good (and must be done for all the libs), I wonder how it can happen that someone got this and why it caused trouble on the UI (maybe the error was uncatched or smg?)

@Haroenv
Copy link
Contributor Author

Haroenv commented Oct 21, 2017

Originally reported in person by @67ideas, what was the usecase Jack?

@67ideas
Copy link

67ideas commented Oct 30, 2017

Unfortunately, they don't have the original query available -- but it would have been an address search (likely copy and pasted from somewhere on the web). It only happened once.

Haroenv added a commit that referenced this issue Oct 31, 2017
The API can only handle queries up to 512 characters and would throw an error in this case (copy pasted addresses for example). This prevents users from typing more than possible, and would simply discard later characters

fixes #510 (haha would be funny is that was issue 512)

supported in all browsers, but would fall back nicely anyway: http://caniuse.com/#feat=maxlength

cc @67ideas
mthuret pushed a commit that referenced this issue Nov 2, 2017
* fix(searchbox): add maxlength 512

The API can only handle queries up to 512 characters and would throw an error in this case (copy pasted addresses for example). This prevents users from typing more than possible, and would simply discard later characters

fixes #510 (haha would be funny is that was issue 512)

supported in all browsers, but would fall back nicely anyway: http://caniuse.com/#feat=maxlength

cc @67ideas

* use maxLength instead of maxlength :react:

* update snapshots

* 😶
samouss added a commit that referenced this issue Nov 2, 2017
<a name="4.2.0"></a>
# [4.2.0](v4.1.3...v4.2.0) (2017-11-02)

### Bug Fixes

* **connectRange:** handle boundaries on first call ([9f14dc0](9f14dc0))
* **connectRange:** use refine instead of cleanUp in metadata ([#526](#526)) ([1861235](1861235))
* **hierarchicaMenu:** allow sorting and using limit ([fe178ed](fe178ed)), closes [#92](#92)
* **InfiniteHits:** add disabled style to the LoadMore button ([#477](#477)) ([faba1ad](faba1ad))
* **Range:** handle float, allow reset and respect boundaries ([75969b8](75969b8))
* **RangeInput:** fix compatibility with React 16 & Panel ([3f218db](3f218db))
* **searchbox:** add maxlength 512 ([#542](#542)) ([5bd4033](5bd4033)), closes [#510](#510)

### Features

* **MenuSelect:** add component and connector ([cc6e0d7](cc6e0d7))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants