Interface: FieldPresenceStore
@roomful/svelte / FieldPresenceStore
Interface: FieldPresenceStore
Section titled “Interface: FieldPresenceStore”Defined in: packages/svelte/src/index.ts:537
Readable store of the active fields (which remote peers are on which field) augmented with the
setActiveField control and a getFieldPeers reader. The store’s value updates when peers enter
or leave a field.
Extends
Section titled “Extends”Readable<FieldPresenceState[]>
Properties
Section titled “Properties”setActiveField()
Section titled “setActiveField()”setActiveField: (
fieldId) =>void
Defined in: packages/svelte/src/index.ts:541
Declares the field the local peer is active on, or null to clear it.
Declares the field the local peer is active on, or null to clear it (e.g. on blur).
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”The active field id, or null.
string | null
Returns
Section titled “Returns”void
Nothing.
Methods
Section titled “Methods”getFieldPeers()
Section titled “getFieldPeers()”getFieldPeers(
fieldId):Peer[]
Defined in: packages/svelte/src/index.ts:546
Returns the remote peers on a field from the current snapshot.
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”string
Returns
Section titled “Returns”Peer[]
subscribe()
Section titled “subscribe()”subscribe(
this,run,invalidate?):Unsubscriber
Defined in: node_modules/.pnpm/svelte@4.2.20/node_modules/svelte/types/index.d.ts:1619
Subscribe on value changes.
Parameters
Section titled “Parameters”void
Subscriber<FieldPresenceState[]>
subscription callback
invalidate?
Section titled “invalidate?”Invalidator<FieldPresenceState[]>
cleanup callback
Returns
Section titled “Returns”Unsubscriber
Inherited from
Section titled “Inherited from”Readable.subscribe