JSFiddle - React, Tailwind, and code Playground
HTML
<div class="editor-field">
<select data-bind="options: propertyTypeList, optionsText: 'PropertyTypeName', value: selectedPropertyType, optionsCaption: 'select property type...'">
</select>
</div>
<div class="editor-label" data-bind="visible: IsVisible('Area')">
Area
</div>
<div class="editor-label" data-bind="visible: IsVisible('Bedroom')">
Bedroom
</div>
JavaScript
var viewModel = {
propertyTypeList: ko.observableArray(['foo', 'bar']),
selectedPropertyType: ko.observable(""),
visibleFeatures: ko.observableArray([]),
IsVisible : function(featureName){//some logic here
return true;
}
};
ko.applyBindings(viewModel);