Liking cljdoc? Tell your friends :D

reacl-c-basics.forms.types

Input types extend over the :type attribute of reacl-c-basics.forms.core/input items, giving more control over the data types of the state value, and to some extend over the ui controls to enter those values. The type system defined here is also extensible.

Input types extend over the `:type` attribute
of [[reacl-c-basics.forms.core/input]] items, giving more control
over the data types of the state value, and to some extend over the
ui controls to enter those values. The type system defined here is
also extensible.
raw docstring

add-attributescljs

(add-attributes type attrs)

Adds additional default attributes for the dom element used for the given type.

Adds additional default attributes for the dom element used for the given type.
sourceraw docstring

booleancljs

An input for a boolean value, represented a checkbox.

An input for a boolean value, represented a checkbox.
sourceraw docstring

decimalcljs

(decimal decimals)

A input type for an integer, but represented and entered as (/ v (^ 10 decimals). E.g. 234 with 2 decimals is shown and entered as "2.34".

A input type for an integer, but represented and entered as `(/ v (^ 10
decimals)`. E.g. 234 with 2 decimals is shown and entered as
"2.34".
sourceraw docstring

enumcljs

(enum values-labels)

An input type for one of some arbitrary values. The argument values-labels must consist of a sequence of tuples [value text] specifying the value selected and a string that represents the value for the user.

An input type for one of some arbitrary values. The argument
`values-labels` must consist of a sequence of tuples `[value text]`
specifying the value selected and a string that represents the value
for the user.
sourceraw docstring

extend-typecljs

(extend-type type parse unparse)

Creates an input type that can allow for more values than the given one. The function parse will be called with the parse function of the given type and the string entered by the user, and the function unparse alike.

Creates an input type that can allow for more values than the given
one. The function `parse` will be called with the parse function of
the given type and the string entered by the user, and the function
`unparse` alike.
sourceraw docstring

fixnumcljs

(fixnum decimals)

An input type for a float, but when entered and displayed, exactly the given number of decimal places are used or shown respectively.

An input type for a float, but when entered and displayed, exactly the given number of
decimal places are used or shown respectively.
sourceraw docstring

integercljs

An input type for a integer number.

An input type for a integer number.
sourceraw docstring

multiline-stringcljs

An input type for a string, represented in a multiline textbox element.

An input type for a string, represented in a multiline textbox element.
sourceraw docstring

native-typecljs

(native-type type)

Creates an input type for one of the native 'types' supported by a dom/input, i.e. "text", "number", "checkbox" etc. Note that not all types are supported by all browsers.

Creates an input type for one of the native 'types' supported by a
dom/input, i.e. "text", "number", "checkbox" etc. Note that
not all types are supported by all browsers.
sourceraw docstring

numbercljs

An input type for a number.

An input type for a number.
sourceraw docstring

opt-integercljs

An input type for an optional integer number.

An input type for an optional integer number.
sourceraw docstring

opt-non-empty-stringcljs

An input type for an optional, but non-empty string.

An input type for an optional, but non-empty string.
sourceraw docstring

opt-numbercljs

An input type for an optional number.

An input type for an optional number.
sourceraw docstring

opt-strict-integercljs

source

opt-stringcljs

An input type for an optional string.

An input type for an optional string.
sourceraw docstring

optionalcljs

(optional type)

Adds 'nil' as a possible value to the given input type. Note that this is may not possible for all types.

Adds 'nil' as a possible value to the given input type. Note that
this is may not possible for all types.
sourceraw docstring

parsed-typecljs

(parsed-type base-type parse unparse)

Creates an input that requires parsing and unparsing of the string entered by the user. The function parse is called with the string entered by the user, and must either return the parsed value of throw parsed/parse-error. The function unparse must return a string representing a parsed value.

Creates an input that requires parsing and unparsing of the string
entered by the user. The function `parse` is called with the string
entered by the user, and must either return the parsed value of
throw [[parsed/parse-error]]. The function `unparse` must return a
string representing a parsed value.
sourceraw docstring

restrict-typecljs

(restrict-type type f)

Creates an input that allows to restrict the parsed value of the given type further, by threading it though the given function f, which may throw parsed/parse-error. Note that it can be more intuitive for the user to set the input element attribute :invalid in some cases.

Creates an input that allows to restrict the parsed value of the
given type further, by threading it though the given function `f`,
which may throw [[parsed/parse-error]]. Note that it can be more
intuitive for the user to set the input element attribute `:invalid`
in some cases.
sourceraw docstring

strict-integercljs

source

stringcljs

An input type for a string.

An input type for a string.
sourceraw docstring

string-enumcljs

(string-enum strings)

An input type for one of the given strings.

An input type for one of the given strings.
sourceraw docstring

update-type-basecljs

(update-type-base type f)

Calls f with the current base function and replaces it with the result.

Calls f with the current base function and replaces it with the result.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close