lumc-nested / nested-editor

Pedigree editor component for React
https://lumc-nested.github.io/
MIT License
3 stars 1 forks source link

Unique id for pedigree document #15

Open martijnvermaat opened 8 years ago

martijnvermaat commented 8 years ago

Was: GitLab #47

We need a unique id for pedigree document so that we can detect loading/opening a new document in the editor. This property will probably be handy to have for UI related settings (i.e., zoom level) or any other per document settings that we may persist in a given browser session.

One idea of the unique id generation. http://docs.mongodb.org/manual/reference/object-id/

martijnvermaat commented 8 years ago

Another way to detect loading/opening a new document would be for the document store to emit another event (e.g., LOAD_DOCUMENT_EVENT in addition to CHANGE_EVENT) which components can listen for. Not sure if there's some generally accepted flux pattern for this.

Even then we might still want to have document identifiers for other reasons.