0
要一些標記添加到一個布爾輸入(複選框),我想創建這樣的自定義輸入:定製simple_form布爾輸入
class BooleanWithIconInput < SimpleForm::Inputs::BooleanInput
def input(wrapper_options)
super
end
end
的問題是,這個輸入已經顯示有所不同,因爲它缺少一個<div class="checkbox">
容器,它添加了類似control_label
和form_control
。
爲什麼會發生這種情況,我該如何獲得相同的行爲?