How can i get the selected item

Hi,

i have one method to show an list itens, but i need to get the select item and show in a template, how could i do it

method:
fieldsForm() {

  return [

    {

      name: "codigoConta",

      data: setOpcaoDefault(getLista().contas),

      label: "Teste",

      type: "list",

      size: 6,

      value: getLista().contas,

      required: true,

    },

and i need to put the selected item here:

Posição do saldo em {{need to put here- the selected item }}{{ new Date().toLocaleDateString() }} - {{ new Date().toLocaleTimeString() }}

image

You need to have variable at you data object and update it when input changes, something like this:

{{selected}}

// input element that changes, could be also on click depends on your structure
<input @change=“setSelected”>

//data
selected: “”

// method
setSelected(item){
this.selected = item
}