diff --git a/package-lock.json b/package-lock.json index 9fb736dff..63d03fb7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24819,15 +24819,6 @@ "react-dom": ">=16.14.0" } }, - "node_modules/react-virtuoso": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.17.0.tgz", - "integrity": "sha512-od3pi2v13v31uzn5zPXC2u3ouISFCVhjFVFch2VvS2Cx7pWA2F1aJa3XhNTN2F07M3lhfnMnsmGeH+7wZICr7w==", - "peerDependencies": { - "react": ">=16 || >=17 || >= 18 || >= 19", - "react-dom": ">=16 || >=17 || >= 18 || >=19" - } - }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -30084,7 +30075,7 @@ "react-player": "^2.16.0", "react-redux": "^7.2.9", "react-tooltip": "^5.5.2", - "react-virtuoso": "^4.17.0", + "react-virtuoso": "^4.18.1", "sass": "^1.46.0", "semver": "^7.7.1", "shell-quote": "^1.8.3", @@ -31525,6 +31516,16 @@ "url": "https://opencollective.com/express" } }, + "packages/bruno-app/node_modules/react-virtuoso": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.18.1.tgz", + "integrity": "sha512-KF474cDwaSb9+SJ380xruBB4P+yGWcVkcu26HtMqYNMTYlYbrNy8vqMkE+GpAApPPufJqgOLMoWMFG/3pJMXUA==", + "license": "MIT", + "peerDependencies": { + "react": ">=16 || >=17 || >= 18 || >= 19", + "react-dom": ">=16 || >=17 || >= 18 || >=19" + } + }, "packages/bruno-app/node_modules/semver": { "version": "7.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", diff --git a/packages/bruno-app/package.json b/packages/bruno-app/package.json index e8341a0f7..528812fa2 100644 --- a/packages/bruno-app/package.json +++ b/packages/bruno-app/package.json @@ -84,7 +84,7 @@ "react-player": "^2.16.0", "react-redux": "^7.2.9", "react-tooltip": "^5.5.2", - "react-virtuoso": "^4.17.0", + "react-virtuoso": "^4.18.1", "sass": "^1.46.0", "semver": "^7.7.1", "shell-quote": "^1.8.3", diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js index 0e10fe9b3..dee8e1e87 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/EnvironmentDetails/EnvironmentVariables/index.js @@ -1,4 +1,5 @@ import React, { useCallback, useRef, useMemo, useEffect } from 'react'; +import { TableVirtuoso } from 'react-virtuoso'; import cloneDeep from 'lodash/cloneDeep'; import { get } from 'lodash'; import { IconTrash, IconAlertCircle, IconInfoCircle } from '@tabler/icons'; @@ -18,14 +19,28 @@ import { getGlobalEnvironmentVariables, flattenItems, isItemARequest } from 'uti import SensitiveFieldWarning from 'components/SensitiveFieldWarning'; import { sensitiveFields } from './constants'; +const TableRow = React.memo(({ children, item }) =>
| - | Name | -Value | -Secret | -- |
| + | Name | +Value | +Secret | ++ |
| - {!isLastEmptyRow && ( - - )} - | -
-
- handleNameChange(index, e)}
- onBlur={() => handleNameBlur(index)}
- onKeyDown={(e) => handleNameKeyDown(index, e)}
- />
-
- |
-
-
-
- {typeof variable.value !== 'string' && (
-
- |
- - {!isLastEmptyRow && ( - - )} - | -- {!isLastEmptyRow && ( - - )} - | -
| - | Name | -Value | -Secret | -- |
| + | Name | +Value | +Secret | ++ |
| - {!isLastEmptyRow && ( - - )} - | -
-
- handleNameChange(index, e)}
- onBlur={() => handleNameBlur(index)}
- onKeyDown={(e) => handleNameKeyDown(index, e)}
- />
-
- |
-
-
-
- {typeof variable.value !== 'string' && (
-
- |
- - {!isLastEmptyRow && ( - - )} - | -- {!isLastEmptyRow && ( - - )} - | -