I am trying to use a datalist in a Grails template in Grails 3.1. I am using it on the _form.gsp template that I generated using an older version of Grails and have now got it working with the new version of Grails. This field is what I am having issues with in the template:
<div class="fieldcontain ${hasErrors(bean: isUsersTakingInkInstance, field: 'userId', 'error')} ">
<label for="userId">
<g:message code="isUsersTakingInk.userId.label" default="User Id" />
</label>
<g:field list="people" name="userId" value="${this.isUsersTakingInkInstance?.userId}"/>
<datalist id="people">
<g:each in="${people}" var="person">
<option value="${person.people_id}">${person.last_name}, ${person.first_name}</option>
</g:each>
</datalist>
</div>
The issue is that on the page, the dropdown does not display anything. I looked in the source and I know that the datalist is populated with data. The field also displays the arrow as it should for an input using a datalist. When I type anything in there, there are no suggestions as there should be for what I am inputting. So what have I done wrong in setting this up?