1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/project/Project
andreas-unleash e1dd1701cc
fix: laggy switch (#3814)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes laggy environment switch
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

Stabilising the functions with useCallback seems necessary in the table
view
Changed the `checked` property to be dependent on `isChecked` which
wraps the value in useOptimisticUpdate hook made the most difference

<!-- Does it close an issue? Multiple? -->
Closes
#(1-942)[https://linear.app/unleash/issue/1-942/bug-laggy-environment-toggles-in-the-ui]

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-19 13:13:43 +00:00
..
CreateProject
DeleteProject
EditProject
hooks
Import fix: fix broken ImportOptions.tsx (#3657) 2023-05-02 10:17:05 +03:00
ProjectFeaturesArchive
ProjectFeatureToggles fix: laggy switch (#3814) 2023-05-19 13:13:43 +00:00
ProjectForm
ProjectHealth
ProjectInfo Fix/strategy UI improvements (#3766) 2023-05-16 11:15:59 +00:00
ProjectLog
ProjectSettings fix: Move title at the top in default strategy (#3812) 2023-05-19 11:27:34 +00:00
ProjectStats
LazyProject.tsx
LazyProjectExport.tsx
Project.styles.ts
Project.tsx Fix/strategy UI improvements (#3766) 2023-05-16 11:15:59 +00:00
ProjectOverview.tsx Fix/strategy UI improvements (#3766) 2023-05-16 11:15:59 +00:00