import type { Interfaces } from '@quickbi/bi-open-sdk'; import './component.scss'; class MyComponent { render(props: Interfaces.LifecycleProps) { const { data, encoding } = props.customProps!; props.container!.innerHTML = `
${JSON.stringify(
      { encoding, rowCount: data?.values?.length ?? 0 },
      null,
      2,
    )}
`; } /** * trigger when component mounted */ mount(props: Interfaces.LifecycleProps) { props.container!.classList.add('test-component'); console.log('trigger when component mount', props); this.render(props); } /** * trigger when component updated */ update(props: Interfaces.LifecycleProps) { console.log('trigger when component update', props); this.render(props); } /** * trigger when component unmount */ unmount(props: Interfaces.LifecycleProps) { console.log('trigger when component unmount', props); } } export default MyComponent;