Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F996466
boolean.ts
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
572 B
Referenced Files
None
Subscribers
None
boolean.ts
View Options
import
{
FieldHandler
,
FieldHandlerResult
,
}
from
"../shared-crud-form-fields.js"
;
export
const
boolean_handler
:
FieldHandler
<
FieldHandlerResult
,
Partial
<
FieldHandlerResult
>
>
=
async
(
_
,
{
name
},
___
,
{
is_required_expr
,
fields_var
})
=>
({
field
:
`
${
name
}
: new Fields.Boolean(
${
is_required_expr
}
)`
,
controls
:
`new Controls.Checkbox(
${
fields_var
}
.
${
name
}
, { label: "
${
name
}
" })`
,
initial_value_edit
:
{
fallback_value
:
`"false"`
,
parsed_value
:
`String(item.get("
${
name
}
"))`
,
},
main_value_sealious
:
`!!data.
${
name
}
`
,
fallback_value_sealious
:
"false"
,
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 14:04 (12 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557275
Default Alt Text
boolean.ts (572 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment