AnsweredAssumed Answered

Aikau AlfSearchResult bad behavior

Question asked by nilsonmorais on Oct 21, 2016
Latest reply on Oct 26, 2016 by nilsonmorais

Hi,

 

I'm having some problem extending AlfSearchResult, when using the native widget it works well, but when I try extending it still shows the results, but only when I trigger the search event for the second time (Two clicks on search button for example), instead it shows Search Suggestions.

 

I did the same thing extending other widgets and only this one shows this behavior.

 

Thanks in advance for any help.

 

Original code:

{
  "name": "alfresco\/search\/AlfSearchResult",
  "config": {
  "enableContextMenu": false
  },
}

 

Using custom widget:

{
  "name": "js\/AlfSearchResult",
  "config": {
  "enableContextMenu": false
  },
}

 

Custom Widget (AlfSearchResult.js):

define([
  "dojo/_base/declare",
  "dijit/_WidgetBase",
  "alfresco/core/Core",
  "alfresco/search/AlfSearchResult",
    "alfresco/lists/views/layouts/Row",
    "alfresco/search/SearchThumbnail",
    "alfresco/renderers/PropertyLink",
    "alfresco/renderers/Property",
    "alfresco/renderers/DateLink",
    "alfresco/renderers/XhrActions",
    "dojo/_base/lang",
    "dojo/dom-class",
    "alfresco/renderers/XhrContextActions",
    "alfresco/renderers/Selector",
    "alfresco/renderers/Size",
    "alfresco/renderers/MoreInfo",
    "alfresco/enums/urlTypes",
  ],
  function(declare, _WidgetBase, Core, AlfSearchResult, Row,SearchThumbnail, PropertyLink,
  Property, DateLink, XhrActions, lang, domClass, XhrContextActions, Selector, Size, MoreInfo, urlTypes,
  ) {


  return declare([AlfSearchResult], {
  postCreate: function custom_AlfSearchResult__postCreate() {

  this.inherited(arguments);
  },
  });
});

Outcomes