Skip to content

Commit

Permalink
Fix CreateAPI button disabled on first load issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tharikaGitHub committed Apr 3, 2021
1 parent 84a9cc0 commit 90827da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<script src="<%= app.context %>/site/public/conf/userThemes.js"></script>
<script src="<%= app.context %>/site/public/conf/portalSettings.js"></script>
<script src="<%= app.context %>/services/settings/settings.js"></script>
<script src="<%= app.context %>/site/public/dist/index.fc461e9bbc4da676f1ba.bundle.js"></script>
<script src="<%= app.context %>/site/public/dist/index.995ea8069b6c11d013a0.bundle.js"></script>
<!-- Swagger worker has being removed until we resolve
* https://github.com/wso2/product-apim/issues/10694 issue, need to change webpack config too -->
<!--script src="<%= app.context %>/"></script-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ function CreateApi(props) {
}
}

useEffect(() => {
validate('name', name);
validate('context', context);
validate('version', version);
}, []);

const runAction = () => {
const promisedCreateApi = API.createApiFromService(serviceKey, { ...state, policies }, type);
promisedCreateApi.then((data) => {
Expand Down

0 comments on commit 90827da

Please sign in to comment.