mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-19 05:45:18 +00:00
Lesson 13, pt 2 - interactive select-all button
This commit is contained in:
@@ -10,10 +10,20 @@ export const useEmailSelection = function(){
|
||||
emails.add(email)
|
||||
}
|
||||
}
|
||||
let clear = () => {
|
||||
emails.clear()
|
||||
}
|
||||
let addMultiple = (newEmails) => {
|
||||
newEmails.forEach((email) => {
|
||||
emails.add(email)
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
emails,
|
||||
toggle
|
||||
toggle,
|
||||
clear,
|
||||
addMultiple
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user