203203Specific options per type
204204-------------------------
205205
206+ ### fieldset and section
207+
206208*fieldset* and *section* doesn't need a key. You can create generic groups with them.
207209They do need a list of ` ` ` items` ` ` to have as children.
208210` ` ` javascript
@@ -215,8 +217,10 @@ They do need a list of ```items``` to have as children.
215217}
216218` ` `
217219
220+ ### conditional
221+
218222A *conditional* is exactly the same as a *section*, i.e. a ` ` ` < div> ` ` ` with other form elements in
219- it, hence they *section* needs an ` ` ` items` ` ` property. They also need a ` ` ` condition` ` ` which is
223+ it, hence they need an ` ` ` items` ` ` property. They also need a ` ` ` condition` ` ` which is
220224a string with an angular expression. If that expression evaluates as thruthy the *conditional*
221225will be rendered into the DOM otherwise not. The expression is evaluated in the parent scope of
222226the ` ` ` sf- schema` ` ` directive (the same as onClick on buttons). This is useful for hiding/showing
@@ -264,7 +268,7 @@ event handlers and such. The condition need not reference a model value it could
264268scope.
265269
266270
267-
271+ ### select and checkboxes
268272
269273*select* and *checkboxes* can take an object, ` ` ` titleMap` ` ` , where key is the value to be saved on the model
270274and the value is the title of the option.
@@ -278,6 +282,8 @@ and the value is the title of the option.
278282}
279283` ` `
280284
285+ ### actions
286+
281287*actions* behaves the same as fieldset, but can only handle buttons as chidren.
282288` ` ` javascript
283289{
@@ -289,8 +295,13 @@ and the value is the title of the option.
289295}
290296` ` `
291297
298+ ### button
299+
292300*button* can have a ` ` ` onClick` ` ` attribute that either, as in JSON Form, is a function *or* a
293- string with an angular expression, as with ng-click.
301+ string with an angular expression, as with ng-click. The expression is evaluated in the parent scope of
302+ the ` ` ` sf- schema` ` ` directive.
303+
304+ ` ` ` javascript
294305[
295306 { type: ' button' , title: ' Ok' , onClick : function (){ ... } }
296307 { type: ' button' , title: ' Cancel' , onClick: " cancel()" }
0 commit comments