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??
} }); });
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.
Great idea. It worked.
Thx,
Wybrand.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.