-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Currently merging strategy is coupled with VDOM merger and cannot be customized. You cannot create specific strategy for your own view type. This is important for couple of reasons:
- It could fix in elegant way, problem with text input position. We could create specific view type for input that supports storing text position before updating text and restore it after that. It
- It would allow to create custom views to implement integrations with foreign libraries (like Codemirror or Leaflet).
Possible solution is add specific "class" - ViewMerger that would implement methods like
merge- move functions like mergeTag, mergeText from VDOM createMergercreateNode- remove node() method from View and decouple it from ViewfinishAttach- called after node creationprepareDestroying- called before node destroy
Additional class ElementViewMerger would contain specific methods like
setProperty- here we would fix input field issue
ViewMergers would be declared in createMerger call. Couple of ViewMergers would be declared by default. It would be ElementViewMerger, TextViewMerger and InputViewMerger.
Reactions are currently unavailable