Previously, updates of the node fields from outside the form using setFields did not trigger re-fetching the initial state, and thus providing updated values to the form. This is to avoid unnecessary re-renders of the form and unnecessary requests when setFields is triggered from within the form. This PR resets the initial state, thus triggering a re-render and re-fetch of the initial state, if node.setFields is called from outside the form. This preserves the performance optimization
8 lines
163 B
TypeScript
8 lines
163 B
TypeScript
'use client'
|
|
|
|
import type { PluginComponent } from '@payloadcms/richtext-lexical'
|
|
|
|
export const ModifyInlineBlockPlugin: PluginComponent = () => {
|
|
return null
|
|
}
|