Hi,
I want to use the custom widget in taskRenderer, i create a custom widget that is called 'Card',
Then i use it in taskRenderer like below code:
The card class is very simple like below:
export class Card extends Widget {
static get configurable() {
return {
href: null,
text: null,
};
}
compose() {
const { href, text } = this;
return {
tag: 'a',
href,
text,
};
}
}
The taskRenderer is like below:
export const taskRenderer = (
{ taskRecord, cardConfig }: any,
) => {
const card = new Card({
appendTo: cardConfig.children,
text: 'Copyable link',
href: '#foo',
});
};
But the compile is error, I am confused for how to use the custom widget correctly.