Suspending Adaptable Objects

Summary

  • Suspendable Adaptable Objects can be turned off with IsSuspended: true without deleting them from State
  • Suspend / unsuspend from the Settings Panel toggle, or via Module API (suspend… / unSuspend…)
  • Not every object type supports suspension (e.g. Layouts, Calculated Columns)

Many objects in AdapTable derive from SuspendableObject (which itself derives from AdaptableObject).

Caution

Not all AdapTable Objects can be suspended — for some it makes no sense, e.g. Layouts or Calculated Columns

The interface exposes a single IsSuspended property:

PropertyTypeDescription
IsSuspendedbooleanSuspends (i.e. turns off) an Adaptable Object
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

When this property is true, the object becomes inactive but remains in Adaptable State.

You can set it in Initial Adaptable State (so objects ship inactive), or toggle it at run-time.

Note

Suspendable Objects display a toggle in the Settings Panel so users can suspend or unsuspend without deleting the object

Hint

  • All API classes that deal with Suspendable Objects expose suspend and unSuspend methods
  • For example, suspendCustomSort / unSuspendCustomSort in Custom Sort API, or suspendGridFilter / unSuspendGridFilter on the Grid Filter API
Suspending Objects
Fork
  • This demo includes a Format Column on Name (blue) and a Grid Filter — both with IsSuspended: true
  • On load neither applies: Name is unstyled and all rows are visible
  • Unsuspend to activate each object without recreating it
Try It Out
  • Open Settings Panel → Format Column and toggle the suspended Format Column onName turns blue
  • In the Grid Filter toolbar, click Unsuspend — only JavaScript and high Github Stars rows remain
  • Suspend either again to turn it off while keeping the definition in State
Loading demo…

FAQ

What is the difference between suspending and deleting an object?

  • Suspend keeps the object in Adaptable State (IsSuspended: true) but stops it applying
  • Delete removes it entirely. Prefer suspend when you may want the definition again later.

Can I ship objects already suspended in Initial State? Yes. Set IsSuspended: true on the object in Initial State (as in the demo above). Users (or your code) can unsuspend later via the Settings Panel / toolbar or the Module API.

How do I suspend or unsuspend from code? Use the Module API for that object type — typically suspendX / unSuspendX (and often suspendAll… / unSuspendAll…). See the relevant Module's Technical Reference.

Why can't I suspend Layouts or Calculated Columns? Those types do not implement SuspendableObject. Suspension is only available where turning an object off without removing it is a meaningful behaviour.