From 5068c24e5c1c1e731adee6c8037e2ece275c140f Mon Sep 17 00:00:00 2001 From: Daniel Playfair Cal Date: Fri, 13 Oct 2017 19:42:16 +1100 Subject: [PATCH] Add ability to set fields in an issue in redux --- src/actions/index.js | 6 +++ src/components/MeetingTable.js | 89 ++++++++++++++++++++++++---------- src/reducers/issues.js | 7 ++- src/selectors/issues.js | 4 ++ 4 files changed, 80 insertions(+), 26 deletions(-) diff --git a/src/actions/index.js b/src/actions/index.js index d97fe7b..836dc33 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -45,3 +45,9 @@ export const commitIssue = dispatch => { }) }) } + +export const changeField = (key, value) => ({ + type: 'UPDATE_ISSUE', + key, + value, +}) diff --git a/src/components/MeetingTable.js b/src/components/MeetingTable.js index 1b444e4..13a90a5 100644 --- a/src/components/MeetingTable.js +++ b/src/components/MeetingTable.js @@ -1,29 +1,68 @@ -import React from 'react' +import React, { PureComponent } from 'react' +import { connect } from 'react-redux' +import { changeField } from '../actions' +import { selectDraftIssue } from '../selectors/issues' import styles from '../css/MeetingTable' -const MeetingTable = () => ( -
-
- - -
-
- -