-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
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
Delete single item #32
base: master
Are you sure you want to change the base?
Conversation
@@ -9,6 +9,23 @@ const syncChartToAnchor = canvas => { | |||
'a' | |||
).href = `data:image/svg+xml;base64,\n${window.btoa(canvas.innerHTML)}` | |||
}) | |||
|
|||
const removeByIndexButtons = document.querySelectorAll( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qui spezzerei in due la gestione. Sul componente Board
gestirei il click sulle "x", la board poi emette un evento custom che index.js
legge e invoca il cambio di dati. Inoltre a cosa ti serve l'attributo listner-added
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mi torna, listner-added
mi serve per non aggiungere N volte il listner
textNode.setAttribute('font-weight', 'bold') | ||
textNode.setAttribute('cursor', 'default') | ||
textNode.setAttribute('data-index', index) | ||
textNode.setAttribute('data-remove-by-index', index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qui cambierei la gestione degli attributi. Dato che abbiamo già il data-index
per indicare a quale post-it si far riferimento non aggiungerei due volte lo stesso valore. Ma dato che questo attributo ci fa da selettore possiamo semplicemente aggiungerlo ma vuoto.
No description provided.