patch epochs to update with parent
This commit is contained in:
parent
a74d387834
commit
d87a99c498
3 changed files with 5 additions and 3 deletions
|
@ -29,7 +29,8 @@ const Epochs = ({epochs, errors, dispatch}) => {
|
||||||
const dispatchValue = {
|
const dispatchValue = {
|
||||||
name: epoch.name,
|
name: epoch.name,
|
||||||
index: epochIndex,
|
index: epochIndex,
|
||||||
changes: epoch.changes
|
changes: epoch.changes,
|
||||||
|
parent: epoch.parent
|
||||||
}
|
}
|
||||||
dispatch({
|
dispatch({
|
||||||
type: "SET_EPOCH",
|
type: "SET_EPOCH",
|
||||||
|
|
|
@ -46,9 +46,10 @@ const SoundChangeSuite = props => {
|
||||||
<select
|
<select
|
||||||
name="parent"
|
name="parent"
|
||||||
list={`${epoch.name}-parents-list`}
|
list={`${epoch.name}-parents-list`}
|
||||||
value={epoch.parent}
|
value={epoch.parent || 'none'}
|
||||||
onChange={e=>changeHandler(
|
onChange={e=>changeHandler(
|
||||||
e, ()=>{
|
e, ()=>{
|
||||||
|
console.log(e.target.value)
|
||||||
setEpoch({...epoch, parent:e.target.value})
|
setEpoch({...epoch, parent:e.target.value})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,7 +277,7 @@ export const run = (state: stateType, action: resultsAction): stateType => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const results = passResults.map(stringifyResults);
|
const results = passResults.map(stringifyResults);
|
||||||
return {...state, results }
|
return {...state, results, errors: {} }
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
return {...state, errors: err };
|
return {...state, errors: err };
|
||||||
|
|
Loading…
Reference in a new issue