Plus Minus

Summary

  • Plus / Minus increments / decrements numeric cells when the + or - keys are pressed
  • Users can set the amount by which the Cell will change
  • And specify a Nudge Rule which defines whether the Nudge should be applied

Plus / Minus updates editable, numeric cells in response to keyboard input:

  • the plus keyboard key will cause an increment of the cell's value
  • the minus keyboard key will cause a decrement of the cell's value

Note

This is ideal for situations where data needs to be edited incredibly quickly (e.g. if marking to market)

Plus Minus uses Nudge Rules - provided by users - which specify:

  • where to apply the Nudge
  • the amount by which to increment or decrement the cell
  • when to apply the Nudge - by providing an optional Rule

Caution

  • Ensure that the CellSelectionModule has been provided in AG Grid Modules
  • Additionally make sure that the cellSelection property in AG Grid GridOptions is not set to false or null

Applying Plus Minus

Plus / Minus is applied when the user presses the + or - keys in numeric cells which are in a Nude Rule Scope.

AdapTable will automatically increment or decrement the cell by the Rule's Nudge Value.

Using Plus/Minus
Fork
  • This demo has 2 Plus / Minus Rules defined
    • Nudges in the GitHub Stars column change the value by 100
    • Nudges in the GitHub Watchers column change the value by 200
Try It Out
  • Select a cell in the the GitHub Stars or Github Watchers Columns and press the + or - key on your Keyboard

Plus Minus Rules

It is possible to add a Rule to a Plus / Minus Definition.

Note

The Rule is a standard Boolean Expression evaluated by AdapTableQL

This sets that the Plus / Minus is only applied by AdapTable if the Rule is evaluated as true.

Hint

  • It is also possible to set 2 (or more) Nudge Definitions one with a Rule, and another without a Rule
  • The default Nudge Definition will be applied only if all Rules have been evalated and returned false
Using Plus/Minus Rules
Fork
  • This demo has 3 Plus / Minus Rules defined, all for the GitHub Stars column:
    • Nudge by 500 if the value for the Language column in the Row is TypeScript
    • Nudge by 250 if the value for the Language column in the Row is HTML
    • Nudge by 10 in all other cases (the default value - when no Rule is applied)
Try It Out
  • Select a cell in the the GitHub Stars column and press the + or - key on your Keyboard
  • If Language column in the Row is TypeScript it will nudge by 500; otherwise it will nude by 10

Creating Plus Minus Rules

Plus / Minus can be managed at runtime via the Plus / Minus section of the Settings Panel.

This lists the details of all existing Nudge Rules in Adaptable State together with options to:

  • create (via the Shortcut Wizard)
  • edit (via the Shortcut Wizard)
  • delete
  • suspend
  • share (if Team Sharing is running)
UI Step by Step Guide

Using the Plus / Minus Wizard

Defining Plus Minus Rules

Plus / Minus Nudge Rules can be provided at design-time through Plus Minus Initial Adaptable State.

Developer Guide

Providing a Plus / Minus Nudge Rule in Initial Adaptable State

UI Entitlements

Plus / Minus Nudge Rules with ReadOnly Entitlement can be applied but Users cannot manage or suspend them.

FAQ

Can I use Plus/Minus across multiple cells simultaneously? Yes, AdapTable will automatically apply the correct nudge value for each cell in the selection.