fix: cannot resize table editor columns on safari (#43450)

## Problem

On Safari, it's impossible to resize a column.

## Solution 

This is actually a bug in `react-data-grid` that has been fixed in more
recent versions but we can't use them.
Patch the package

## How to test

- Open the any table in the _Table editor_
- Resize a column
This commit is contained in:
Gildas Garcia
2026-03-06 08:01:22 +01:00
committed by GitHub
parent 8a5ad58f81
commit 77004016f4
22 changed files with 79 additions and 15 deletions
+1
View File
@@ -36,6 +36,7 @@ jobs:
with:
sparse-checkout: |
packages
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
with:
@@ -29,6 +29,7 @@ jobs:
# fetch only the root files and scripts folder
sparse-checkout: |
scripts
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
with:
+1
View File
@@ -36,6 +36,7 @@ jobs:
sparse-checkout: |
packages
apps
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
@@ -21,6 +21,7 @@ jobs:
with:
sparse-checkout: |
scripts
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+1
View File
@@ -28,6 +28,7 @@ jobs:
fetch-depth: 0
sparse-checkout: |
apps/docs
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
@@ -20,6 +20,7 @@ jobs:
ref: master
sparse-checkout: |
apps/docs
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
@@ -28,6 +28,7 @@ jobs:
with:
sparse-checkout: |
apps/docs
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+1
View File
@@ -31,6 +31,7 @@ jobs:
sparse-checkout: |
apps/docs
packages
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+1
View File
@@ -24,6 +24,7 @@ jobs:
sparse-checkout: |
apps/docs
packages
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+1
View File
@@ -30,6 +30,7 @@ jobs:
examples
packages
supabase
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+1
View File
@@ -29,6 +29,7 @@ jobs:
sparse-checkout: |
packages/pg-meta
packages/tsconfig
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+5 -1
View File
@@ -20,7 +20,9 @@ jobs:
- name: Check out repo
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
sparse-checkout: apps
sparse-checkout: |
apps
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
with:
@@ -46,6 +48,7 @@ jobs:
with:
sparse-checkout: |
i18n
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
with:
@@ -71,6 +74,7 @@ jobs:
sparse-checkout: |
apps/docs/pages
apps/docs/content
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
with:
+1
View File
@@ -48,6 +48,7 @@ jobs:
examples
packages
supabase
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
@@ -20,6 +20,7 @@ jobs:
.github
apps/studio
packages
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+2 -1
View File
@@ -26,6 +26,7 @@ jobs:
.github
apps/studio
packages
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
@@ -41,5 +42,5 @@ jobs:
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Run ratchet script
- name: Run ratchet script
run: pnpm --filter studio run lint:ratchet
+3
View File
@@ -36,6 +36,8 @@ jobs:
sparse-checkout: |
apps/studio
packages
patches
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
@@ -83,6 +85,7 @@ jobs:
with:
sparse-checkout: |
apps/studio
patches
- name: Download coverage artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
+1
View File
@@ -23,6 +23,7 @@ jobs:
with:
sparse-checkout: |
packages
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+1
View File
@@ -33,6 +33,7 @@ jobs:
with:
sparse-checkout: |
packages
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
if: steps.filter.outputs.relevant == 'true'
+1
View File
@@ -30,6 +30,7 @@ jobs:
apps/www
packages
supabase
patches
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
name: Install pnpm
+32
View File
@@ -0,0 +1,32 @@
diff --git a/lib/bundle.cjs b/lib/bundle.cjs
index 810cb878ffb394df9f17296995a838e08a7d6ccf..4ba752efe1b1de392c3254d1b0d12ab9a637362f 100644
--- a/lib/bundle.cjs
+++ b/lib/bundle.cjs
@@ -1412,10 +1412,7 @@ function HeaderCell({
hasDoubleClicked = true;
onColumnResize(column, 'max-content');
}
- function onLostPointerCapture(event) {
- if (!hasDoubleClicked) {
- onPointerMove(event);
- }
+ function onLostPointerCapture() {
currentTarget.removeEventListener('pointermove', onPointerMove);
currentTarget.removeEventListener('dblclick', onDoubleClick);
currentTarget.removeEventListener('lostpointercapture', onLostPointerCapture);
diff --git a/lib/bundle.js b/lib/bundle.js
index ac667d97a43720d1f56995e63ad6556b80d4c4bf..42b6a17f382fffadbb8cdd2d7a6b42235af89ad0 100644
--- a/lib/bundle.js
+++ b/lib/bundle.js
@@ -1408,10 +1408,7 @@ function HeaderCell({
hasDoubleClicked = true;
onColumnResize(column, 'max-content');
}
- function onLostPointerCapture(event) {
- if (!hasDoubleClicked) {
- onPointerMove(event);
- }
+ function onLostPointerCapture() {
currentTarget.removeEventListener('pointermove', onPointerMove);
currentTarget.removeEventListener('dblclick', onDoubleClick);
currentTarget.removeEventListener('lostpointercapture', onLostPointerCapture);
+8 -3
View File
@@ -80,6 +80,11 @@ overrides:
'@aws-sdk/core>fast-xml-parser': ^5.3.5
openapi-sampler>fast-xml-parser: ^5.3.5
patchedDependencies:
react-data-grid:
hash: 803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488
path: patches/react-data-grid.patch
importers:
.:
@@ -176,7 +181,7 @@ importers:
version: 18.3.1
react-data-grid:
specifier: 7.0.0-beta.47
version: 7.0.0-beta.47(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
version: 7.0.0-beta.47(patch_hash=803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react-day-picker:
specifier: ^9.11.1
version: 9.11.1(react@18.3.1)
@@ -1007,7 +1012,7 @@ importers:
version: 5.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react-data-grid:
specifier: 7.0.0-beta.47
version: 7.0.0-beta.47(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
version: 7.0.0-beta.47(patch_hash=803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react-day-picker:
specifier: ^9.11.1
version: 9.11.1(react@18.3.1)
@@ -34849,7 +34854,7 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
react-data-grid@7.0.0-beta.47(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
react-data-grid@7.0.0-beta.47(patch_hash=803f02d6cede565990ab9675326b93195b98bcc6477a4811715405892c257488)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
clsx: 2.1.1
react: 18.3.1
+13 -10
View File
@@ -13,9 +13,9 @@ catalog:
'@types/node': ^22.0.0
'@types/react': ^18.3.0
'@types/react-dom': ^18.3.0
next: ^15.5.10
lodash-es: ^4.17.23
lodash: ^4.17.23
lodash-es: ^4.17.23
next: ^15.5.10
react: ^18.3.0
react-dom: ^18.3.0
recharts: ^2.15.4
@@ -44,7 +44,7 @@ minimumReleaseAge: 10080
minimumReleaseAgeExclude:
- '@ai-sdk/*'
- '@supabase/*'
- 'next'
- next
- '@next/*'
- ai
- js-yaml
@@ -66,17 +66,20 @@ onlyBuiltDependencies:
- supabase
overrides:
'@aws-sdk/core>fast-xml-parser': ^5.3.5
'@mapbox/node-pre-gyp>tar': ^7.5.8
'@redocly/respect-core>form-data': ^4.0.4
'@redocly/respect-core>js-yaml': ^4.1.1
cacache>tar: ^7.5.8
esbuild: ^0.25.2
nodemailer: ^7.0.11
lodash-es: 'catalog:'
lodash: 'catalog:'
lodash-es: 'catalog:'
node-gyp>tar: ^7.5.8
nodemailer: ^7.0.11
openapi-sampler>fast-xml-parser: ^5.3.5
payload>undici: ^7.18.2
refractor>prismjs: ^1.30.0
cacache>tar: ^7.5.8
node-gyp>tar: ^7.5.8
'@mapbox/node-pre-gyp>tar': ^7.5.8
tmp: ^0.2.4
'@aws-sdk/core>fast-xml-parser': ^5.3.5
openapi-sampler>fast-xml-parser: ^5.3.5
patchedDependencies:
react-data-grid: patches/react-data-grid.patch