Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010586
existing-sealious-value.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
622 B
Referenced Files
None
Subscribers
None
existing-sealious-value.ts
View Options
import
{
Field
}
from
"sealious"
;
import
{
PickFromListField
}
from
"./pick-from-list.js"
;
export
class
ExistingSealiousValue
<
Required
extends
boolean
>
extends
PickFromListField
<
Required
>
{
constructor
(
required
:
Required
,
field
:
Field
<
unknown
>
)
{
super
(
required
,
async
(
ctx
)
=>
{
const
{
items
}
=
await
field
.
collection
.
list
(
ctx
.
$context
).
fetch
();
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return
Object
.
fromEntries
(
items
.
map
((
item
)
=>
{
const
value
=
item
.
get
(
field
.
name
)
as
unknown
;
return
[
value
,
value
];
})
);
});
}
getEmptyValue
()
{
return
""
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:44 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
627661
Default Alt Text
existing-sealious-value.ts (622 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment