stub run changes function for form submit

This commit is contained in:
Sorrel Bri 2019-11-29 23:37:32 -08:00
parent 949ae87026
commit c3e4650ad7
2 changed files with 9 additions and 3 deletions

View file

@ -14,12 +14,17 @@ const PhonoChangeApplier = () => {
const [ epochs, setEpochs ] = useState([{name: 'epoch 1', changes:['[+ feature]>[- feature]/_#']}]);
const [ options, setOptions ] = useState({output: 'default', save: false})
const runChanges = e => {
e.preventDefault();
console.log('running...')
}
return (
<div className="PhonoChangeApplier" data-testid="PhonoChangeApplier">
<ProtoLang lexicon={lexicon} setLexicon={setLexicon}/>
<Features phonemes={phonemes} setPhonemes={setPhonemes}/>
<Epochs epochs={epochs} setEpochs={setEpochs}/>
<Options options={options} setOptions={setOptions}/>
<Options options={options} setOptions={setOptions} runChanges={runChanges}/>
</div>
);
}

View file

@ -15,7 +15,8 @@ const Options = props => {
return (
<div className="Options" data-testid="Options">
<h3>Modeling Options</h3>
<form onSubmit={()=>{}} data-testid="Options-form">
<form onSubmit={e=>props.runChanges(e)} data-testid="Options-form">
{/* <h5>Output</h5> */}
@ -53,7 +54,7 @@ const Options = props => {
/>
<label htmlFor="save">Store session on Run</label>
<input type="submit"></input>
<input type="submit" value="Run Changes"></input>
</form>