Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add autocomplete to a riek field? #68

Open
carolinaroman opened this issue Jan 17, 2018 · 0 comments
Open

How to add autocomplete to a riek field? #68

carolinaroman opened this issue Jan 17, 2018 · 0 comments

Comments

@carolinaroman
Copy link

carolinaroman commented Jan 17, 2018

Hi

I need to add word completion to some of my riek fields. Currently I am using Awesomplete [1] in my project, and according to the documentation a very simple setup would be, with no explicit Javascript needed (after including css and js):

<input class="awesomplete" list="mylist" />
<datalist id="mylist">
	<option>Ada</option>
	<option>Java</option>
	<option>JavaScript</option>
	<option>Brainfuck</option>
	<option>LOLCODE</option>
	<option>Node.js</option>
	<option>Ruby on Rails</option>
</datalist>

However, it doesn't seem like riek preserves the list attribute. The field is defined:

<RIEInput change={propObj => this.onChange(index, propObj)}
                    className="awesomplete"
                    list="mylist"
                    propName="name"
                    value=""
                    {...validator} />

The Chrome inspection tool shows me that in editing mode the field is:

<input class="awesomplete" value="hat">

The list attribute is missing and awesomplete does not work. Is there some way to make this work or to add any other word completion to a riek field?

Thank you,

[1] http://leaverou.github.io/awesomplete/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant