I created a new view. I want to display a more accurate message when the itemDatasource is blank. Same as the CustomerDetailsView when there are no loyalty cards or nothing in the wishList.
My view has an HTML file, and then 2 TypeScript files, one for the vie and one for the ViewModel.
I saw in "RetailSDK\POSWeb\Views\Customer\CustomerDetailsView\CustomerDetailsView.html" that it has a Script-tag with the ID "emptyWishListTemplate". Then it has a Div-tag with a data-bind and in here is the dataList with the property emptyDataListTemplate: 'emptyWishListTemplate'.
However my view doesn't have its dataList inside the HTML, its in the View.ts file . The HTML only has a Div-tag with a data-bind: data-bind="msPosDataList: dataListRelated"
I added below it the Script-tag with an ID, same as in the CustomerDetailsView.
However when I try to reference this id in the View.Ts file in the property of the DataList, it tells me it cannot find the template with that ID.
So where do I add the template so that it can be seen by the emptyDataListTemplateId property on the IDataListState?
My view also has 3 columns, each with its own list, similar as on the customerDetailsView. Currently I only get the standard "We didn't find anything to display here". I want to replace this with my custom message similar as the message on the CustomerDetailsView if there is nothing to display under the wishList tor the Loyalty cards for example.
The customerDetailsView will show the following if there are no loyalty cards or a wish lisT:
Any help on how to accomplish the above with a new custom view that has an HTML-file, View and ViewModel files.