Class: Playbook::PbTypeahead::Typeahead
- Inherits:
-
Object
- Object
- Playbook::PbTypeahead::Typeahead
show all
- Includes:
- Playbook::Props
- Defined in:
- app/pb_kits/playbook/pb_typeahead/typeahead.rb
Instance Method Summary
collapse
#dark_props, #generate_classname, #generate_classname_without_spacing, #initialize, #prop, #spacing_options, #spacing_props, #spacing_values
Instance Method Details
#classname ⇒ Object
24
25
26
|
# File 'app/pb_kits/playbook/pb_typeahead/typeahead.rb', line 24
def classname
generate_classname("pb_typeahead_kit")
end
|
#data ⇒ Object
28
29
30
31
32
33
34
|
# File 'app/pb_kits/playbook/pb_typeahead/typeahead.rb', line 28
def data
Hash(values[:data]).merge(
pb_typeahead_kit: true,
pb_typeahead_kit_search_term_minimum_length: search_term_minimum_length,
pb_typeahead_kit_search_debounce_timeout: search_debounce_timeout
)
end
|
#typeahead_with_pills_options ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'app/pb_kits/playbook/pb_typeahead/typeahead.rb', line 36
def typeahead_with_pills_options
base_options = {
isMulti: true,
label: label,
options: options,
placeholder: placeholder
}
base_options.merge!({
async: true,
loadOptions: load_options,
}) if async
base_options
end
|