mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 19:08:44 +08:00
- closes https://github.com/supabase/supabase/issues/47606 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Copying cell values now preserves `false` and `0` instead of treating them like empty values. * Clipboard copy behavior now only returns blank for truly empty inputs, helping keep table data accurate when copied. * **Tests** * Added end-to-end coverage for copying table cells with `false`, `0`, and `true` values. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
8 lines
183 B
TypeScript
8 lines
183 B
TypeScript
export function formatClipboardValue(value: unknown) {
|
|
if (value == null) return ''
|
|
if (typeof value === 'object') {
|
|
return JSON.stringify(value)
|
|
}
|
|
return String(value)
|
|
}
|