You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+47-51Lines changed: 47 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
SelectBox & MultiSelectBox hybrid input with lazy & asynchronous options loading capabilities to be used with Select2, Selectize, Chosen and similar UI libraries.
7
7
8
-
The aim of Slectoo is to provide a flexible tool for creating reusable select inputs.
8
+
The aim of Selectoo is to provide a flexible tool for creating reusable select inputs.
9
9
10
10
11
11
## Features
@@ -20,42 +20,6 @@ The aim of Slectoo is to provide a flexible tool for creating reusable select in
20
20
- dependent / cascading inputs
21
21
22
22
23
-
## Notable differences compared to Nette SelectBox & MultiSelectBox
24
-
25
-
- lazy options loading using a callback
26
-
- disabling a Selectoo input does not modify/reset its value, so it can be re-enabled without the loss of the information
27
-
28
-
29
-
## Lazy options loading
30
-
31
-
Lazy loading is used when the Selectoo instance is given "item callback" callable instead of an array of items.
32
-
The callable is supposed to return a list of items.
33
-
34
-
The item callback also works as a validator for values.
35
-
It receives raw value as the first argument (and the input instance as the second).
36
-
The callback should return the array of possible values (these are the items) in form
37
-
exactly the same as the items set to `SelectBox` or `MultiSelectBox` inputs.
38
-
The raw value is then compared to the returned items and filtered.
39
-
This approach ensures the validity of the data.
40
-
41
-
It is important to set this callback in case you work with remote item loading (ajax/api loading of options).
42
-
43
-
44
-
## Supported and intended UI libraries
45
-
46
-
Selectoo uses "script engines" to generate JavaScript UI scripts along with HTML input element.
47
-
Any script engine can be attached to the `Selectoo` instance by calling `$selectoo->setEngine($engine)`.
See [script-management example](examples/script-management/Select2SelectooWithCollectorFactory.php) for more information.
134
124
135
125
136
126
## Dependent selections / cascading inputs
@@ -151,6 +141,12 @@ What is needed, in general:
151
141
By following these steps, dependent Selectoo inputs can be created and values validated.
152
142
153
143
144
+
## Notable differences compared to Nette SelectBox & MultiSelectBox
145
+
146
+
- disabling a Selectoo input does not modify/reset its value, so it can be re-enabled without the loss of the information
147
+
- disabled input is handled differently - raw value is always loaded even when input (or items) is disabled. The disabled values are filtered when calling `getValue` method.
0 commit comments