Skip to content

Commit 46a922a

Browse files
committed
Fix CreateAPI button disabled on first load issue
1 parent 9ecb34a commit 46a922a

File tree

2 files changed

+7
-1
lines changed
  • features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher

2 files changed

+7
-1
lines changed

features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/site/public/pages/index.jag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<script src="<%= app.context %>/site/public/conf/userThemes.js"></script>
4848
<script src="<%= app.context %>/site/public/conf/portalSettings.js"></script>
4949
<script src="<%= app.context %>/services/settings/settings.js"></script>
50-
<script src="<%= app.context %>/site/public/dist/index.fc461e9bbc4da676f1ba.bundle.js"></script>
50+
<script src="<%= app.context %>/site/public/dist/index.995ea8069b6c11d013a0.bundle.js"></script>
5151
<!-- Swagger worker has being removed until we resolve
5252
* https://github.com/wso2/product-apim/issues/10694 issue, need to change webpack config too -->
5353
<!--script src="<%= app.context %>/"></script-->

features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/ServiceCatalog/CreateApi.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,12 @@ function CreateApi(props) {
312312
}
313313
}
314314

315+
useEffect(() => {
316+
validate('name', name);
317+
validate('context', context);
318+
validate('version', version);
319+
}, []);
320+
315321
const runAction = () => {
316322
const promisedCreateApi = API.createApiFromService(serviceKey, { ...state, policies }, type);
317323
promisedCreateApi.then((data) => {

0 commit comments

Comments
 (0)