That illustrates the difference between anterograde amnesia and dementia. Dementia is a general degradation of the brain that includes memory but you can have amnesia with an otherwise perfectly functional brain. A patient with dementia would never text her kids as in OP's case.
Glad that your wife got over it.