JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.21/themes/black-tie/jquery-ui.css">
<input type="text" id="name" />
<input type="text" id="value" />
<input type="text" id="spz" />
JavaScript
var src = [{
"label": "jmeno1",
"value": "val1",
"spz": "spz"
},
{ "label": "jmeno12",
"value": "val12",
"spz": "spz2"
},
{ "label": "jmeno13",
"value": "val31",
"spz": "spz3"
}];
$("#name").autocomplete({
source: src,
select: function (event, ui) {
event.preventDefault();
/*this.value = ui.item.label;*/
$("#name").val(ui.item.label);
$("#value").val(ui.item.value);
$("#spz").val(ui.item.spz);
},
minLength: 3
});