Unable to show text along side a drop down in bootstrap knockout webpage

后端 未结 1 803
[愿得一人]
[愿得一人] 2021-01-25 17:30

In the second TR, text \'Minutes\' is visible by side of TextBox, but in first TR, \'Minutes\' is not appearing.

相关标签:
1条回答
  • 2021-01-25 17:53

    Your problem has nothing to do with Knockout:

    you have self-closed your select tag which results in invalid HTML so the browser interprets your span as the content of the select.

    To fix this just properly close your select with </select>:

    <tr>
        <td data-bind="i18nTranslateText: 'abc'"></td>
        <td>
            <select style="width: auto;" data-bind="options: pqr, value: abc.xyz" >
            </select>
            <span data-bind="i18nTranslateText: 'Minutes'"></span>
        </td>
    </tr>
    
    0 讨论(0)
提交回复
热议问题