I’d like to reset the value of an input field (text='') whenever model.id is null.
How to bind the input value to respond to a certain value of an observable object? Something that would look like:
<input type="text" data-bind="text: if (model.value == null) { '' }" />
You can use
?operator in data-bind attribute: