JSFiddle - React, Tailwind, and code Playground
HTML
<div class="editor-field">
<select data-bind="options: propertyTypeList, value: selectedPropertyType, optionsCaption: 'select property type...'"></select>
</div>
<div class="editor-label" data-bind="visible: visibleDiv() === 'Area'">Area</div>
<div class="editor-label" data-bind="visible: visibleDiv() === 'Bedroom'">Bedroom</div>
JavaScript
function ViewModel() {
var self = this;
self.propertyTypeList = ko.observableArray(['Area', 'Bedroom', 'Other']);
self.selectedPropertyType = ko.observable("");
self.visibleFeatures = ko.observableArray([]);
self.visibleDiv = ko.computed(function () {
//Your logic here
return self.selectedPropertyType();
});
};
ko.applyBindings(new ViewModel());