-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement conditional guest / attendee removal (#7)
* Progress on conditional removal * Get conditional removal working
- Loading branch information
1 parent
2bb43db
commit b72671a
Showing
10 changed files
with
246 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import { types, getParent } from "mobx-state-tree"; | ||
import Guest from "./guest"; | ||
|
||
const GuestStore = types.model("GuestStore", { | ||
guests: types.map(Guest), | ||
get form() { | ||
return getParent(this); | ||
const GuestStore = types.model( | ||
"GuestStore", | ||
{ | ||
guests: types.map(Guest), | ||
get form() { | ||
return getParent(this); | ||
} | ||
}, | ||
{ | ||
removeGuest(id) { | ||
this.guests.delete(id); | ||
return true; | ||
} | ||
} | ||
}); | ||
); | ||
|
||
export default GuestStore; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.