Hi, I am creating my first control, but it gave me the below error, I attached the code in the init event, please advise.
public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement)
{
this.localNotifyOutputChanged = notifyOutputChanged;
//Configure buttons
this.nextButtonElement = document.createElement("a");
this.nextButtonElement.setAttribute("class","next");
this.nextButtonElement.addEventListener("click",this.nextOnClick.bind(this));
this.nextButtonElement = document.createElement("a");
this.nextButtonElement.setAttribute("class","previous");
this.nextButtonElement.addEventListener("click",this.previousOnClick.bind(this));
this.spaceElement = document.createElement("span");
var _previous = container.appendChild(this.previousButtonElement);
var _space = container.appendChild(this.spaceElement);
var _next = container.appendChild(this.nextButtonElement);
_previous.innerHTML = "« Previous";
_space.innerHTML = " ";
_next.innerHTML = "Next »";
}
HI @sdnd2000 ,
You've created two times the this.nextButtonElement, but forgot to create this.previousButtonElement.
It must be a copy/paste error.
Kind regrads,
Diana
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
mmbr1606
71
Super User 2025 Season 1