@univerjs/core v0.4.2 • Docs
Enumeration: CommandType
The type of a command.
Enumeration Members
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
COMMAND | 0 | Responsible for creating, orchestrating, and executing MUTATION or OPERATION according to specific business logic. For example, a delete row COMMAND will generate a delete row MUTATION, an insert row MUTATION for undo, and a set cell content MUTATION. | submodules/univer/packages/core/src/services/command/command.service.ts:37 (opens in a new tab) |
MUTATION | 2 | OPERATION is the change made to data that is not saved to snapshot, without conflict resolution, such as modifying scroll position, modifying sidebar state, etc. | submodules/univer/packages/core/src/services/command/command.service.ts:48 (opens in a new tab) |
OPERATION | 1 | MUTATION is the change made to the data saved to snapshot, such as inserting rows and columns, modifying cell content, modifying filter ranges, etc. If you want to add collaborative editing capabilities to Univer, it is the smallest unit of conflict resolution. | submodules/univer/packages/core/src/services/command/command.service.ts:43 (opens in a new tab) |