Giter VIP home page Giter VIP logo

Comments (2)

greptile-apps avatar greptile-apps commented on June 8, 2024

To address the object deactivation and caching issue, ensure that after deactivating an object in SettingsObjectEdit.tsx via handleDisable, you also update the Apollo cache to reflect this change. Use useDeleteRecordFromCache from useDeleteRecordFromCache.ts to remove the deactivated object from the cache. If the object's data is still appearing, it might be due to stale cache entries. Implement a cache update in handleDisable by invoking deleteRecordFromCache with the appropriate parameters, including the object's metadata and ID. This ensures the cache is in sync with the current state of the object post-deactivation.

References

/packages/twenty-front/src/pages/settings/data-model/SettingsObjectEdit.tsx
/packages/twenty-front/src/modules/object-record/cache/hooks/useDeleteRecordFromCache.ts
/packages/twenty-front/src/modules/object-record/cache/utils/deleteRecordFromCache.ts
/packages/twenty-server/src/engine/api/rest/metadata-rest.service.ts
/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts
/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts
/packages/twenty-server/src/workspace/workspace-sync-metadata/factories/standard-relation.factory.ts
/packages/twenty-front/src/modules/views/hooks/internal/usePersistViewFilterRecords.ts
/packages/twenty-front/src/modules/views/hooks/internal/usePersistViewSortRecords.ts
/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecord.ts
/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecords.ts

Ask Greptile

from twenty.

FelixMalfait avatar FelixMalfait commented on June 8, 2024

This was fixed in #5316 which we need to rollout

from twenty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.