Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Enhancement: "renderItem" should get an extra parameter which is the current value of the input field #194

Open
CroniD opened this issue Dec 9, 2016 · 2 comments
Labels

Comments

@CroniD
Copy link

CroniD commented Dec 9, 2016

Hi there,

currently it isn't possible to render an item, so that the matching part is highlighted (e.g. bold formatted). The function of the "renderItem" param needs an additional parameter for the current value of the input field. See Autocomplete.js line 276.

@CMTegner
Copy link
Collaborator

currently it isn't possible to render an item, so that the matching part is highlighted (e.g. bold formatted)

You already have the current value, it's the same as props.value.

@CroniD
Copy link
Author

CroniD commented Jan 5, 2017

Hi @CMTegner ,

I'm aware of that. This issue doesn't point to an implementation bug, it's about api consistency. In other function parameters you pass on the current value of the input field, which means these functions are side-effect free (regarding the value), e.g. "shouldItemRender", "sortItems" etc. This one is not.

@CMTegner CMTegner added the api label Apr 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants