API Reference / @gtkx/react / config / ElementBehavior
Type Alias: ElementBehavior<T>
ElementBehavior<
T> =object
Defined in: packages/react/src/reconciler/registry.ts:34
Type Parameters
T
T extends GObject.Object = GObject.Object
Properties
attach?
optionalattach?: (object,child,info) =>unknown
Defined in: packages/react/src/reconciler/registry.ts:38
Places a child, claiming it by returning anything other than undefined.
Parameters
object
T
child
GObject.Object
info
Returns
unknown
constructOnly?
optionalconstructOnly?:string[]
Defined in: packages/react/src/reconciler/registry.ts:52
Props the behavior can only apply while the element is being built, because the library exposes no counterpart to whatever applied them. Changing one after it has been applied throws instead of silently applying the new value on top of the old.
create?
optionalcreate?: (props) =>GObject.Object
Defined in: packages/react/src/reconciler/registry.ts:36
Builds the GObject from its construct props, for types whose constructor does more than set properties.
Parameters
props
Returns
GObject.Object
detach?
optionaldetach?: (object,child,info) =>void
Defined in: packages/react/src/reconciler/registry.ts:42
Removes a child this behavior attached.
Parameters
object
T
child
GObject.Object
info
Returns
void
reorder?
optionalreorder?: (object,child,info) =>unknown
Defined in: packages/react/src/reconciler/registry.ts:40
Moves an already-attached child; without it, the whole slot is detached and re-attached in order.
Parameters
object
T
child
GObject.Object
info
Returns
unknown
resolve?
optionalresolve?: (object,child) =>GObject.Object|null
Defined in: packages/react/src/reconciler/registry.ts:44
Returns the object the container adopts for a child, overriding whatever attach returned.
Parameters
object
T
child
GObject.Object
Returns
GObject.Object | null
update?
optionalupdate?: (object,prev,next) =>Iterable<string> |undefined
Defined in: packages/react/src/reconciler/registry.ts:46
Applies changed props and returns the names it consumed, which are then not set as GObject properties.
Parameters
object
T
prev
next
Returns
Iterable<string> | undefined