RevoGrid Event Patterns and Lifecycles
This page maps the event graph from the current source, not from assumptions.
Source priority used for this guide:
src/components/revoGrid/revo-grid.tsxsrc/components/overlay/revogr-overlay-selection.tsxsrc/components/clipboard/revogr-clipboard.tsxsrc/plugins/sorting/sorting.plugin.tssrc/plugins/filter/filter.plugin.tsxsrc/components/header/revogr-header.tsxsrc/components/selectionFocus/revogr-focus.tsxsrc/components/editors/revogr-edit.tsxsrc/components/order/revogr-order-editor.tsxsrc/components/data/revogr-data.tsxsrc/components/scroll/revogr-viewport-scroll.tsxsrc/types/events.ts
How to read these diagrams
revo-gridevents are the public root lifecycle most app code listens to.- Child-component events are often the trigger layer that
revo-gridlistens to and translates. - Some plugin events are real but not part of the typed root
RevogridEventsunion. - If a
before*event is cancelable, the branch stops at that point.
Event Layers
Root Grid Lifecycle
This is the outer lifecycle created by componentWillLoad, watchers, and render hooks.
Focus, Selection, and Edit Lifecycle
This flow starts in revogr-overlay-selection.tsx and is completed by revo-grid plus revogr-focus.tsx.
Edit commit notes
beforeeditstartblocks opening the editor.beforecellsaveblocks the overlay from forwarding the save.beforeeditblocks the root data write.aftereditfires after single-cell and range writes.
Range, Autofill, and Clipboard Lifecycle
The range flow is handled in the overlay and clipboard components, then translated into root edit events by revo-grid.
Clipboard copy/cut
Clipboard paste
Header, Sorting, and Filtering Lifecycle
Header events start in revogr-header.tsx. Sorting and filtering then hook into those events.
Sorting
Filtering
Row Ordering Lifecycle
Scroll and Data Render Lifecycle
Source and Config Watchers
These are not user gestures. They are reactive lifecycle edges triggered by prop updates.
Public vs Internal Event Surface
Use src/types/events.ts as the typed public event catalog.
Most application integrations should anchor on:
created,aftergridinit,beforegridrender,aftergridrenderbeforesourceset,beforeanysource,aftersourceset,afteranysourcebeforecolumnsset,beforecolumnapplied,aftercolumnssetbeforeeditstart,beforeedit,beforerangeedit,aftereditbeforecellfocus,beforefocuslost,afterfocusbeforerange,beforeautofillbeforesorting,beforesortingapply,beforesourcesortingapply,sortingconfigchangedbeforefilterapply,beforefiltertrimmed,beforetrimmed,aftertrimmedrowdragstart,roworderchangedviewportscroll,contentsizechanged,aftercolumnresize
Useful internal or plugin-only events that also appear in flows:
beforeapplyrange,beforesetrange,setrangebeforepaste,beforepasteapply,pasteregion,afterpasteapplybeforecopyregion,clipboardrangecopy,clipboardrangepastebeforefocusrender,beforescrollintoviewbeforeheaderclick,beforeheaderrender,beforegroupheaderrenderaftersortingapply,afterfilterapply,newRows,rtlstatechanged
Recommended Hooks by Use Case
Validate edits before commit
beforeeditbeforerangeeditbeforecellsaveif you need to stop the overlay before the root write
Persist changes after commit
aftereditaftersourcesetif you replace source externally
Drive custom navigation
beforecellfocusbeforefocuslostbeforenextvpfocusafterfocus
Observe filter and sorting transitions
beforefilterapplybeforefiltertrimmedbeforesortingbeforesortingapplybeforesourcesortingapplysortingconfigchanged
Track render and viewport changes
beforegridrenderaftergridrenderbeforedatarenderafterrenderviewportscrollcontentsizechanged