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

Tag Input/Autocomplete: objects as items does not work #405

c-frater opened this Issue Jun 22, 2017 · 1 comment


None yet
2 participants
Copy link

c-frater commented Jun 22, 2017


When using objects with {name, type} properties in the autocomplete data, the value is set to [object Object].

Expected Behavior

The value should use the inputMap result

Actual Behavior

It shows [object Object]

Possible Fix


This detects when the new item that has been added is an object, removes it and replaces it with an inputMapped value.

tagInput.on('add', ({value, type}) => {
  if (hx.isObject(value)) {
    const newItems = tagInput.items()

Steps to Reproduce

const items = [
    type: 'A',
    name: 'A Text'
    type: 'B',
    name: 'B Text'
    type: 'D',
    name: 'D Text'
    type: 'C',
    name: 'C Text'

const inputMap = ({name}) => name

const ti = hx.tagInput({
    autocompleteOptions: {
      renderer: (elem, item) => {
      inputMap: inputMap
    autocompleteData: (term, cb) => {
      cb(items.filter(({name}) => name.indexOf(term) > -1))

Your Environment

  • Hexagon Version: 1.11.0

This comment has been minimized.

Copy link

dzheleznyakov commented Jan 22, 2018

It could be useful to add this info to the docs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment