Using display: 'bootstrap' causes "Uncaught TypeError: data[option] is not a function" error

Using display: 'bootstrap' causes "Uncaught TypeError: data[option] is not a function" error

enwoodenwood Posts: 5Questions: 2Answers: 0
edited February 2018 in Free community support

Hi all;

I have a datatable Editor working nicely, with a modal form, except for the fact that if I switch the 'display' option from "lightbox" to "bootstrap", I'm getting this error as soon as I click Edit, and just as Editor tries to bring up a form:

Uncaught TypeError: data[option] is not a function

It is occurring within the Bootstrap Modal Plugin Definition, here, on line 11:

// MODAL PLUGIN DEFINITION
  // =======================

  function Plugin(option, _relatedTarget) {
    return this.each(function () {
      var $this   = $(this)
      var data    = $this.data('bs.modal')
      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)

      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
      if (typeof option == 'string') data[option](_relatedTarget)
      else if (options.show) data.show(_relatedTarget)
    })
  }

My form works correctly if the display option is set to "lightbox".

I'm using Bootstrap 3.3.7 and jQuery 3.3.1.

Anyone seen this problem and have a solution?

Debug:
https://debug.datatables.net/ulamuz

Thanks,
Tim

Answers

  • enwoodenwood Posts: 5Questions: 2Answers: 0

    Resolved!

    I had the order of some other javascript libraries in my Rails asset javascript manifest file causing something to tromp on Bootstrap.

    Sorry for the distraction!

This discussion has been closed.