Access to onSave and onValidate via props in editComponent ?
vnnegt opened this issue · 4 comments
vnnegt commented
Greetings,
Just wondering if it would be possible to have access to onSave
and onValidate
via props in a custom editComponent
?
For example:
// EditComponent
<div>
<Input type="text"
defaultValue={VALUE}
// this will trigger EasyEdit onValidate
onBlur={ props.onValidate } />
</div>
<ButtonContainer>
<PrimaryButton
// this will trigger EasyEdit onSave
onClick={ props.onSave }>
Submit
</PrimaryButton>
</ButtonContainer>
<EasyEdit
type={Types.TEXT}
value={VALUE}
onSave={
// functioned triggered by PrimaryButton onClick
}
onValidate={
// functioned triggered by Input onBlur
}
allowEdit={editMode}
editMode={editMode}
hideSaveButton={true}
hideCancelButton={true}
displayComponent={
<CustomDisplay/>
}
editComponent={
<CustomEdit/>
}
/>
giorgosart commented
Hey @vnnegt thank you for logging this, let me take a look at it and will get back to you
giorgosart commented
@vnnegt is this something you will be able to implement?
vnnegt commented
@vnnegt is this something you will be able to implement?
haha i was hoping you would be able to
when i asked the question i was new to react so i was looking for a tool that did everything i needed, but i ended up going another route with my project
giorgosart commented
@vnnegt I'm closing this request down then..