Open dxinteractive opened 4 years ago
Could do the "push" thing with a modifier. Wouldnt work with history because its temporal:
things.toArray((thing) => {
return <div key={thing.key}>
<input {...thing.spread()} ref={(node) => thing.meta.isNew && node.focus()} />
</div>;
})
parcel.pipe(isNew())
.modifyDown(asNode(node => {
return node.setMeta({
isNew: !('isNew' in node.meta)
});
}))
Really should be considered. Think about undo / redo stacks too.
Keeping track of focus
push()
,insertAfter()
etc as there are no rendered elements at that time? Or can some clever hooks solve this?.pipe(name('hello'))
to get a unique id for rendered fieldsProbably requires
sharedMeta
to store whatever focus id is needed to be remembered.Should it require the dev to explicitly say when they want focus shifted e.g. when
push()
is called?Binding
Should it go:
onFocus
andonBlur
to inputs, maybe as part ofspread()
changeRequest.originId
already exists, so this could be used.after(callback)
Make change methods return something, where a callback can be passed? how can this tell other rendered fields to do things?