     # search expression in the regex view, in which case the multiword view
     # will be mounted anew when we switch to it and the tags will be set up
     # by componentDidMount.
-
-    tagsInput = $(@refs.taglist.getDOMNode()).tags()
+    tagsInput = @getTagsInput()
 
     if nextProps.term.pos isnt @props.term.pos
       if @props.term.pos

      not currentFeatures.some (cf) -> cf.attr is f.attr and cf.value is f.value

    tagsInput.addTag(feature.value) for feature in newFeatures


  changeTerm: (attribute, value) ->

    if @props.termIndex is 0
      @refs.searchfield.getDOMNode().focus()

    if @props.term.pos or @props.term.features.length
      # If the term already contains a POS or grammatical features when the
      # multiword term view is mounted, we need to create the bootstrap-tags input
      # and fill it in
      tagsInput = @getTagsInput()
      term = @props.term
      tagsInput.addTag(term.pos) if term.pos
      tagsInput.addTag(feature.value) for feature in term.features


  componentWillUnmount: ->
