eschutho commented on a change in pull request #12845:
URL: https://github.com/apache/superset/pull/12845#discussion_r572464285
##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal.tsx
##########
@@ -235,6 +249,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps>
= ({
}
};
+ const expandForm = (trueOrFalse: boolean) => {
+ // Count starts a 0 (closed)
+ // Any checkbox in this for that gets checked
+ // will increase the count and keep the form open
+ if (trueOrFalse) {
+ setCount(count + 1);
+ } else {
+ setCount(count - 1);
+ }
+ };
Review comment:
maybe more succinct:
`setCount(count + (shouldExpand ? 1 : -1)`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]