fix(richtext-*): fix client features were not loaded properly, improve performance of LexicalProvider, slate cell component was non-functional, support richtext adapter Cell RSCs (#6573)
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
'use client'
|
||||
import type { DefaultCellComponentProps } from 'payload/types'
|
||||
|
||||
import { useTableCell } from '@payloadcms/ui/elements/Table'
|
||||
import React from 'react'
|
||||
|
||||
export const RichTextCell: React.FC<DefaultCellComponentProps<any[]>> = ({ cellData }) => {
|
||||
export const RichTextCell: React.FC<DefaultCellComponentProps<any[]>> = () => {
|
||||
const { cellData } = useTableCell()
|
||||
const flattenedText = cellData?.map((i) => i?.children?.map((c) => c.text)).join(' ')
|
||||
|
||||
// Limiting the number of characters shown is done in a CSS rule
|
||||
|
||||
Reference in New Issue
Block a user