0

I have the following autocomplete setup that connects to my datasource:

<ReactiveBase
      app="XXXXX"
      credentials="XXXXX"
    >

      <DataSearch
        componentId="title"
        :dataField="[
          'name',
          'symbol',
        ]"
        className="data-search"
        :showClear="false"
        queryFormat="and"

      />

    </ReactiveBase>

I would like to just alert the value of the the selection, whenever I select one of the autocomplete suggestions.

I have tried adding the following:

    onValueSelected = {
      function (value) {
      alert(value)
      }
    }

But I get a Duplicate attribute '}' error

I am using Vue.

Thanks!

user1525612
  • 1,864
  • 1
  • 21
  • 33

1 Answers1

1

Instead of onValueSelected use @valueSelected. Check Event handling in Vue here.

You can also check this link. I have updated the basic demo of DataSearch component present on docs to use valueSelected.

You can read about the other events in DataSearch component here.

tony19
  • 125,647
  • 18
  • 229
  • 307
Yash Joshi
  • 2,586
  • 1
  • 9
  • 18