10-07-2019 02:19 PM
Hello.
I want to set LiveSearch.templateString by defining a custom searchbox (see the code below).
But LiveSearch.templateString is not a member of the SearchBox class. It is defined as a separate class, when creating SearchBox (see https://dev.alfresco.com/resource/docs/aikau-jsdoc/SearchBox.js.html).
Is there a way to set templateString of LIveSearch using an override of SearchBox??
Greetings,
Wybrand.
define(["dojo/_base/declare", "dojo/text!./templates/my-livesearch.html", "alfresco/header/SearchBox"], function (declare, template, SearchBox) { return declare([SearchBox],{ postMixInProperties: function my_searchBox__postMixInProperties(){
// How to set LiveSearch.templateString since this is not a member of SearchBox??
} }); });
10-07-2019 04:38 PM
Due to nesting, there is no way to set the templateString in LiveSearch. But you could override the postCreate of SearchBox to customise the nested LiveSearch widget after its creating - that is what I did in a project a few years ago.
10-08-2019 07:55 AM
Great idea. It worked.
Thx,
Wybrand.
Explore our Alfresco products with the links below. Use labels to filter content by product module.