We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mithril 2.2.3
Firefox 117 on MacOS
https://jsfiddle.net/v6qgoczx/
const items = [1, 2, 3] const TodoItem = { view: (v) => m('span', v.attrs.value), oncreate: (v) => console.log('create', v.attrs.value), onupdate: (v) => console.log('update', v.attrs.value), onbeforeupdate: (v) => console.log('beforeupdate', v.attrs.value), onremove: (v) => console.log('remove', v.attrs.value), onbeforeremove: (v) => console.log('beforeremove', v.attrs.value), } const TodoList = { view: (v) => m('ul', v.attrs.items.map(item => m('li', m(TodoItem, { value: item, })) )) } m.mount(document.body, { view: () => m(TodoList, { items }) }) setTimeout(() => { items.pop() m.redraw(); }, 1000)
Outputs :
create 1 create 2 create 3 beforeupdate 1 beforeupdate 2 beforeremove 3 <-- missing remove 3 update 1 update 2
create 1 create 2 create 3 beforeupdate 1 beforeupdate 2 remove 3 update 1 update 2
The text was updated successfully, but these errors were encountered:
This hook is only called on the DOM element that loses its parentNode, but it does not get called in its child elements.
Sorry for the noise
Sorry, something went wrong.
This hook is only called on the DOM element that loses its parentNode, but it does not get called in its child elements. Sorry for the noise
Yeah, that's intended behavior. Anything else is a bug.
dead-claudia
No branches or pull requests
Mithril 2.2.3
Firefox 117 on MacOS
Code
https://jsfiddle.net/v6qgoczx/
Steps to Reproduce
https://jsfiddle.net/v6qgoczx/
Expected Behavior
Outputs :
create 1
create 2
create 3
beforeupdate 1
beforeupdate 2
beforeremove 3 <-- missing
remove 3
update 1
update 2
Current Behavior
Outputs :
create 1
create 2
create 3
beforeupdate 1
beforeupdate 2
remove 3
update 1
update 2
The text was updated successfully, but these errors were encountered: