Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3010

chosenbox with listsubmodel does not fire onSearchEvent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.1
    • Freshly, 8.0.0
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.1 S1

      When using a ListSubModel in a chosenbox, the chosenbox _renderByServer is set to true.
      This cause the _fixDisplay function on the chosenbox to go into:

      this._fixEmptyDisplay(

      { showBlank: !this.$n("sel").firstChild }

      )

      This in turn will remove the "empty-creatable" class from the chosenbox if the text typed in the search field did not return at least one possible result (included hidden result already selected). as the value of this.$n("sel").firstChild will be: null

      In turn, this cause the doEnterPressed function to not send the onSearch event at:
      if ((c = this.$n("empty")) && jq(c).hasClass(this.$s("empty-creatable"))) {
      this._fireOnSearch(this.$n("inp").value);
      if (this._open) {
      this.setOpen(false,

      { sendOnOpen: true }

      )
      }

            DevChu DevChu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h