[SalesForce] Display a specific cell value as a url in the lightning datatable in LWC

I need to have a cell value which has a string value such as "www.google.com" as a URL or a hyperlink. I don't want all the rows for a column to have url , so type = 'url' while defining columns won't work. Link of the playground – https://developer.salesforce.com/docs/component-library/tools/playground/kPSqiPxWk/5/edit
Also added the screenshot below.
Here , 3rd row (Image) column – 'Change Value' has text – www.google.com , but it's not clickable. I want this text to be url or hyperlink.enter image description here

Best Answer

I think you are looking for linkify type attribute for "text" column type.

const columns = [
    { label: 'Column', fieldName: 'anyText', type: 'text', typeAttributes: { linkify: true }},
    // other column data
]