withPendingAddPlaceholders() — supabase Function Reference
Architecture documentation for the withPendingAddPlaceholders() function in gridColumns.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD f408eee9_b826_a01c_88d5_bce319f3f146["withPendingAddPlaceholders()"] 2ed5107f_c0f9_3268_cc9e_fbe41b586c43["getCellRenderer()"] 2ed5107f_c0f9_3268_cc9e_fbe41b586c43 -->|calls| f408eee9_b826_a01c_88d5_bce319f3f146 style f408eee9_b826_a01c_88d5_bce319f3f146 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/grid/utils/gridColumns.tsx lines 196–217
function withPendingAddPlaceholders(
Formatter: React.ComponentType<RenderCellProps<SupaRow, unknown>>,
columnDef: SupaColumn
) {
return function PendingAwareFormatter(props: RenderCellProps<SupaRow, unknown>) {
const value = props.row[props.column.key]
if (isPendingAddRow(props.row) && (value === undefined || value === null || value === '')) {
if (columnDef.defaultValue !== undefined && columnDef.defaultValue !== null) {
return <DefaultValue />
}
if (columnDef.isIdentity || columnDef.isGeneratable) {
return <DefaultValue />
}
if (columnDef.isNullable) {
return <NullValue />
}
}
return <Formatter {...props} />
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does withPendingAddPlaceholders() do?
withPendingAddPlaceholders() is a function in the supabase codebase.
What calls withPendingAddPlaceholders()?
withPendingAddPlaceholders() is called by 1 function(s): getCellRenderer.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free