Files
supabase/apps/studio/components/grid/utils/common.ts
Vaibhav 38669218ac fix: preserve copy (#47607)
- 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 -->
2026-07-06 07:17:17 -06:00

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)
}