JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE HTML>
<script src="https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
<script>
sap.ui.localResources("learning");
var view = sap.ui.view({id:"idfirst1", viewName:"learning.first", type:sap.ui.core.mvc.ViewType.JS});
view.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
JavaScript
var oComboBox1 = new sap.ui.commons.ComboBox("ComboBox1");
oComboBox1.setTooltip("Country");
oComboBox1.setEditable(true);
oComboBox1.setValue("Deutschland");
oComboBox1.setWidth("200px");
var oItem = new sap.ui.core.ListItem("Country1");
oItem.setText("Canada");
oComboBox1.addItem(oItem);
oItem = new sap.ui.core.ListItem("Country2");
oItem.setText("Deutschland");
oComboBox1.addItem(oItem);
oItem = new sap.ui.core.ListItem("Country3");
oItem.setText("England");
oComboBox1.addItem(oItem);
oItem = new sap.ui.core.ListItem("Country4");
oItem.setText("Россия");
oComboBox1.addItem(oItem);
var otext = new sap.ui.commons.TextField({
placeholder:"Hi",
change:function(){
sap.ui.getCore().byId("ComboBox1").setEditable(false);
},
});
var olayout = new sap.ui.commons.layout.MatrixLayout({
});
olayout.createRow(otext,oComboBox1);
olayout.placeAt("content");