Add timestamps to GQL fields in useRecordsFieldVisibleGqlFields hook (#15185)
This fixes #15156 Issue: Restore and Destroy buttons not appearing in action menu for deleted records until the record detail view is opened. Cause: The record index/table view queries only fetched fields that were visible as table columns The [deletedAt] field (along with [createdAt] and [updatedAt]) was not included in these queries since it's not a visible column The action menu logic checks [selectedRecord?.deletedAt] to determine if a record is deleted and which actions to display Without the [deletedAt] field in the record store, the action menu couldn't detect deleted records Opening the detailed view would fetch all fields (including [deletedAt]), which is why the buttons would appear afterward Solution Modified [useRecordsFieldVisibleGqlFields] to always include the standard fields ([createdAt], [updatedAt], [deletedAt]) in record index queries, regardless of column visibility. This ensures the action menu can immediately detect deleted records --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@@ -141,7 +141,7 @@ jobs:
|
||||
cd packages/twenty-front
|
||||
touch .env
|
||||
echo "" >> .env
|
||||
echo "REACT_APP_SERVER_BASE_URL: $REACT_APP_SERVER_BASE_URL" >> .env
|
||||
echo "REACT_APP_SERVER_BASE_URL=$REACT_APP_SERVER_BASE_URL" >> .env
|
||||
- name: Publish to Chromatic
|
||||
run: npx nx run twenty-front:chromatic:ci
|
||||
front-task:
|
||||
|
||||
Reference in New Issue
Block a user