renamed prop
This commit is contained in:
parent
42110f8821
commit
7697ec5474
3 changed files with 4 additions and 4 deletions
|
|
@ -1045,7 +1045,7 @@ export default function BinSettings(props: Props) {
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
:
|
:
|
||||||
<Box sx={{border: "1px solid white", borderRadius: 2, padding: 2, marginBottom: 2}}>
|
<Box sx={{border: "1px solid white", borderRadius: 2, padding: 2, marginBottom: 2}}>
|
||||||
<CustomGrainForm grainSettings={customGrain} onGrainSettingsChange={(newGrainSettings) => {setCustomGrain(newGrainSettings)}}/>
|
<CustomGrainForm initialGrain={customGrain} onGrainSettingsChange={(newGrainSettings) => {setCustomGrain(newGrainSettings)}}/>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
||||||
|
|
@ -655,7 +655,7 @@ export default function ComponentForm(props: Props) {
|
||||||
/>
|
/>
|
||||||
{useCustomGrain ?
|
{useCustomGrain ?
|
||||||
<Box sx={{border: "1px solid white", borderRadius: 2, padding: 2, marginBottom: 2}}>
|
<Box sx={{border: "1px solid white", borderRadius: 2, padding: 2, marginBottom: 2}}>
|
||||||
<CustomGrainForm onGrainSettingsChange={updateCustomGrain} grainSettings={form.component.customGrainProps()}/>
|
<CustomGrainForm onGrainSettingsChange={updateCustomGrain} initialGrain={form.component.customGrainProps()}/>
|
||||||
</Box>
|
</Box>
|
||||||
:
|
:
|
||||||
<SearchSelect
|
<SearchSelect
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@ import { useGrainAPI } from "providers/pond/grainAPI"
|
||||||
import React, { useEffect, useState } from "react"
|
import React, { useEffect, useState } from "react"
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
grainSettings?: pond.GrainSettings
|
initialGrain?: pond.GrainSettings
|
||||||
onGrainSettingsChange: (settings: pond.GrainSettings) => void
|
onGrainSettingsChange: (settings: pond.GrainSettings) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CustomGrainForm(props: Props) {
|
export default function CustomGrainForm(props: Props) {
|
||||||
const {grainSettings, onGrainSettingsChange} = props
|
const {initialGrain: grainSettings, onGrainSettingsChange} = props
|
||||||
const grainAPI = useGrainAPI()
|
const grainAPI = useGrainAPI()
|
||||||
const [{as}] = useGlobalState()
|
const [{as}] = useGlobalState()
|
||||||
const [name, setName] = useState(grainSettings ? grainSettings.name : "")
|
const [name, setName] = useState(grainSettings ? grainSettings.name : "")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue