JS Column is used for "custom columns" in tables, rendering the content of each row's cell via JavaScript. It is not bound to a specific field and is suitable for scenarios such as derived columns, combined displays across fields, status badges, action buttons, and remote data aggregation.

When rendering each cell, JS Column provides the following context APIs:
ctx.element: The DOM container of the current cell (ElementProxy), supporting innerHTML, querySelector, addEventListener, etc.ctx.record: The current row's record object (read-only).ctx.recordIndex: The row index within the current page (starts from 0, may be affected by pagination).ctx.collection: The metadata of the collection bound to the table (read-only).ctx.requireAsync(url): Asynchronously loads an AMD/UMD library by URL.ctx.importAsync(url): Dynamically imports an ESM module by URL.ctx.openView(options): Opens a configured view (modal/drawer/page).ctx.i18n.t() / ctx.t(): Internationalization.ctx.onRefReady(ctx.ref, cb): Renders after the container is ready.ctx.React / ctx.ReactDOM / ctx.antd: Support for JSX, rendered directly by ctx.ReactDOM.ctx.render(vnode): Renders a React element/HTML/DOM to the default container ctx.element (the current cell). Multiple renders will reuse the Root and overwrite the existing content of the container.The script editor for JS Column supports syntax highlighting, error hints, and built-in code snippets.
Snippets: Opens the list of built-in code snippets, allowing you to search and insert them at the current cursor position with one click.Run: Runs the current code directly. The execution log is output to the Logs panel at the bottom, supporting console.log/info/warn/error and error highlighting.
You can also use an AI Employee to generate code:
if (!lib) return;).class or [name=...] selectors instead of fixed ids to prevent duplicate ids across multiple blocks or modals.