tao_form 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5521bf4502ca9a6941d4abac9ef625729fb2a09
|
|
4
|
+
data.tar.gz: f524d32a134b56fc71dad0577957e146cc8a08d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6343308262bd1fb10c8bb8958722928af99818327873f06db04806508212d5bab0d4c4ffc4d676fe071fc49021ac1c746619f344c4a68f1e2271f885220f8232
|
|
7
|
+
data.tar.gz: f0fe200e9f83d874ff464ee2b25020612cf50863deb4cb74c848b264dbea71e05ba98092fe3c35c03fc7e6cde71f92f7a37235203c99b3a1937ca1ad967b16ed
|
|
@@ -8,9 +8,7 @@ class Tao.Form.Select.DataProvider extends TaoModule
|
|
|
8
8
|
@option 'field'
|
|
9
9
|
|
|
10
10
|
_init: ->
|
|
11
|
-
@
|
|
12
|
-
Option.fromElement optionEl
|
|
13
|
-
.get()
|
|
11
|
+
@_initOptions()
|
|
14
12
|
|
|
15
13
|
@field.on 'tao:addOption', (e, option) =>
|
|
16
14
|
if option.data?.group
|
|
@@ -20,6 +18,11 @@ class Tao.Form.Select.DataProvider extends TaoModule
|
|
|
20
18
|
else
|
|
21
19
|
@options.unshift option
|
|
22
20
|
|
|
21
|
+
_initOptions: ->
|
|
22
|
+
@options = @field.find('option').map (i, optionEl) ->
|
|
23
|
+
Option.fromElement optionEl
|
|
24
|
+
.get()
|
|
25
|
+
|
|
23
26
|
getOption: (value) ->
|
|
24
27
|
return value if value instanceof Option
|
|
25
28
|
return null if _.isNull(value) || _.isUndefined(value)
|
|
@@ -68,3 +71,6 @@ class Tao.Form.Select.DataProvider extends TaoModule
|
|
|
68
71
|
[]
|
|
69
72
|
|
|
70
73
|
callback? options, result.totalSize
|
|
74
|
+
|
|
75
|
+
reset: ->
|
|
76
|
+
@_initOptions()
|
data/lib/tao_form/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tao_form
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- your name
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-09-
|
|
11
|
+
date: 2017-09-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tao_on_rails
|