-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add institution scenario #46
Comments
At first it is not working, when I tried to use different instances of const {
fields: institutions,
append: appendInstitution,
} = useFieldArray({
name: `institutions`,
}); The problem was that to fix this I passed
const arrayName = `${institutionName}.assets`;
const {
fields: assets,
remove,
append,
} = useFieldArray({
name: arrayName,
}); Maybe I need to pass |
Since useFieldArray function handleInstitutionCreate({ append, setSelectedIndex, fields }) {
append({
name: "",
country: "",
assets: [
{
amount: "",
currency: "",
isEarning: false,
description: "",
},
],
});
// how to get updated fields list here?
const selectedIndex = fields.length;
setSelectedIndex(selectedIndex);
} |
Temporarily not updating StoryBook, because to implement components, which rely on context, need to write tons of decorator stuff. Do not know how to deal with it. Demo of scenario: |
Implement scenario when user creates new institution.
The text was updated successfully, but these errors were encountered: