   addCategory: (category) ->
     if category.name != null
       category_editor = new CategoryEditor(@node, category, @property_engine)
-      @category_engine.addCategory category_editor
+      @category_engine.addNode category_editor.node.find(".typeahead.js-cat-name")
     else
       category_editor = new DefaultCategoryEditor(@node, category, @property_engine)
 

  serialize: ->
    { key: @key(), value: @value(), display: @display(), measurement: @measurement() }

class PropertyCategoryTypeahead
  constructor: ->
    @nodes = []
    @engine = new Bloodhound({
      datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
      queryTokenizer: Bloodhound.tokenizers.whitespace,
      dupDetector: (datum1, datum2) ->

        rateLimitBy: "debounce",
        rateLimitWait: 500
      }
    }

  name: ->
    "categories"
