Forum Stats

  • 3,767,858 Users
  • 2,252,726 Discussions


Popup LOV Error - Uncaught TypeError: Cannot read property 'length' of null

User_BM3HY Member Posts: 2 Green Ribbon

I am using APEX version against an Oracle 19c database.

I have a popup LOV that throws an error if I try to change the sort order. The list of values for the LOV is of type Shared Component and uses a list of values that includes additional display columns. It is set to display as a modal dialog with initial fetch set to On User Request.

The error occurs when I try to change the sort order by clicking in one of the column headers. It doesn't matter if I've searched for anything yet or not.

If I change the initial fetch attribute of the LOV to Automatic, the error does not occur.

I have created a demo application where this behavior can be observed here:

The problem appears to be in the T function of desktop_all.min.js?v=

This is what I see in the inspector:

Uncaught TypeError: Cannot read property 'length' of null

  at T (desktop_all.min.js?v=

  at HTMLDivElement.sortChange (desktop_all.min.js?v=

  at a.<computed>.<computed>._trigger (desktop_all.min.js?v=

  at a.<computed>.<computed>._sortChange (interactiveGrid.min.js?v=

  at a.<computed>.<computed>._sortChange (desktop_all.min.js?v=

  at HTMLButtonElement.<anonymous> (interactiveGrid.min.js?v=

  at HTMLDivElement.dispatch (desktop_all.min.js?v=

  at HTMLDivElement.v.handle (desktop_all.min.js?v=

HTMLDivElement.sortChange is calling the T function like this: T(A, null,, t.direction)

The function T reads:

function T(e, o, n, a) {

      var i, s = !1, c = !1, h = l.getOption("fetchData");

      e.forceRefresh && (s = !0,

      "none" !== r.initialFetch || e.typeAhead && O || (c = !0), = null,

      e.forceRefresh = !1),

      null !== o && o !== && ( = o,

      s = !0),

      n && a && (n !== h.sortColumn || a !== h.sortDirection) && (h.sortColumn = n,

      h.sortDirection = a,

      s = !0),

      s && (i = t.escapeRegExp([_%]/g, (function(e) {

        return "[^<>&]" + ("%" === e ? "*" : "")



      u.options.highlighterContext = {


        re: new RegExp("([<>&;])|(" + i + ")","ig")


      _ ? o.length >= r.minSearchChars && !c && !e.typeAhead ? (u._setOption("noDataMessage", P),

      l.clearData()) : (u._setOption("noDataMessage", _),

      l.setData([]), = null) : e.typeAhead && !O ? (l.setData([]), = null) : l.clearData(),

      e.typeAhead = !1)


and the error is raised at this line: _ ? o.length >= r.minSearchChars && !c && !e.typeAhead ? (u._setOption("noDataMessage", P)

I can see that HTMLDivElement.sortChange is passing null to o, so the error makes sense but I have no idea how to control what gets passed to o. I have several applications that use popup LOVs this way and they all error this way.

Is this a known bug?