playbook_ui 14.8.0.pre.alpha.PLAY16254545 → 14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +63 -12
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
- data/app/pb_kits/playbook/pb_typeahead/index.ts +291 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +5 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -0
- data/dist/chunks/{_typeahead-D0PihN_3.js → _typeahead-IoHUnHeF.js} +1 -1
- data/dist/chunks/{_weekday_stacked-uMIX8f-A.js → _weekday_stacked-BuaqHM9z.js} +1 -1
- data/dist/chunks/{lib-BC6ESsxG.js → lib-SyD3buPZ.js} +1 -1
- data/dist/chunks/{pb_form_validation-B_Z9rEbg.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +321 -0
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/forms/builder/typeahead_field.rb +13 -0
- data/lib/playbook/version.rb +1 -1
- metadata +5 -5
@@ -5,6 +5,19 @@ module Playbook
|
|
5
5
|
class Builder
|
6
6
|
def typeahead(name, _options = {}, _html_options = {}, props: {})
|
7
7
|
props[:name] = name
|
8
|
+
|
9
|
+
input_id = "#{name}_input"
|
10
|
+
props[:input_options] ||= {}
|
11
|
+
props[:input_options][:id] ||= input_id
|
12
|
+
|
13
|
+
props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
|
14
|
+
|
15
|
+
if props[:validation]
|
16
|
+
validation_message = props[:validation][:message]
|
17
|
+
props[:input_options][:data] ||= {}
|
18
|
+
props[:input_options][:data][:validation_message] = validation_message
|
19
|
+
end
|
20
|
+
|
8
21
|
@template.pb_rails("typeahead", props: props)
|
9
22
|
end
|
10
23
|
end
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.8.0.pre.alpha.
|
4
|
+
version: 14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -3170,11 +3170,11 @@ files:
|
|
3170
3170
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3171
3171
|
- app/pb_kits/playbook/utilities/text.ts
|
3172
3172
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3173
|
-
- dist/chunks/_typeahead-
|
3174
|
-
- dist/chunks/_weekday_stacked-
|
3173
|
+
- dist/chunks/_typeahead-IoHUnHeF.js
|
3174
|
+
- dist/chunks/_weekday_stacked-BuaqHM9z.js
|
3175
3175
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3176
|
-
- dist/chunks/lib-
|
3177
|
-
- dist/chunks/pb_form_validation-
|
3176
|
+
- dist/chunks/lib-SyD3buPZ.js
|
3177
|
+
- dist/chunks/pb_form_validation-Dt8UJgrJ.js
|
3178
3178
|
- dist/chunks/vendor.js
|
3179
3179
|
- dist/menu.yml
|
3180
3180
|
- dist/playbook-doc.js
|