fix: wizard tables are not on edit mode by default
This commit is contained in:
parent
edce075b18
commit
0f4350f99c
3 changed files with 8 additions and 6 deletions
|
|
@ -50,7 +50,8 @@ const ETable = ({
|
|||
disableRowEdit,
|
||||
groupBy,
|
||||
sortBy,
|
||||
createText = 'Add override'
|
||||
createText = 'Add override',
|
||||
outerEditingId = null
|
||||
}) => {
|
||||
const [editingId, setEditingId] = useState(null)
|
||||
const [adding, setAdding] = useState(false)
|
||||
|
|
@ -87,7 +88,7 @@ const ETable = ({
|
|||
|
||||
const onReset = () => {
|
||||
setAdding(false)
|
||||
setEditingId(null)
|
||||
setEditingId(outerEditingId)
|
||||
setEditing && setEditing(false)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,11 +65,11 @@ function Commissions({ dispatch, namespace }) {
|
|||
rowSize="lg"
|
||||
titleLg
|
||||
name="commissions"
|
||||
outerEditingId={1}
|
||||
enableEdit
|
||||
initialValues={values}
|
||||
save={save}
|
||||
validationSchema={schema}
|
||||
data={R.of(values)}
|
||||
data={R.of({ ...values, id: 1 })}
|
||||
elements={mainFields(currency)}
|
||||
/>
|
||||
</Section>
|
||||
|
|
|
|||
|
|
@ -86,11 +86,12 @@ function Locales({ dispatch, namespace }) {
|
|||
rowSize="lg"
|
||||
titleLg
|
||||
name="locale"
|
||||
enableEdit
|
||||
initialValues={locale}
|
||||
outerEditingId={1}
|
||||
enableEdit
|
||||
save={save}
|
||||
validationSchema={schema}
|
||||
data={R.of(locale)}
|
||||
data={R.of({ ...locale, id: 1 })}
|
||||
elements={mainFields(data)}
|
||||
/>
|
||||
</Section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue