Home > @uniformdev/mesh-sdk > MeshLocationCore

MeshLocationCore interface

Core shared generic for a mesh location context

Signature:

Properties

<table><thead><tr><th>

Property

</th><th>

Modifiers

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

dialogContext?

</td><td>

</td><td>

DialogContext & { params: unknown; returnDialogValue: (value: unknown) => Promise<void>; }

</td><td>

(Optional) Context of a location when it is rendering inside a dialog in the Uniform app. This is set when: - You pop out the app using sdk.openCurrentLocationDialog() so the location is rendered in a dialog for more screen space - The current location is a named dialog that was opened from the location using sdk.openLocationDialog()

This is undefined when the current location is not a dialog.

</td></tr> <tr><td>

isReadOnly

</td><td>

</td><td>

boolean

</td><td>

If true, any editable fields on the current location should be disabled as the user does not have permission or otherwise cannot change them.

</td></tr> <tr><td>

metadata

</td><td>

</td><td>

TMetadata

</td><td>

Gets the current location metadata, context data which is provided from the Uniform app to assist in rendering the Mesh UI Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.

</td></tr> <tr><td>

setValue

</td><td>

</td><td>

SetLocationFunction<TSetValue>

</td><td>

Sets the current value of the location. All locations other than 'settings' update into a parent form state and should be updated live as changes occur in the Mesh app. The 'settings' location writes to the database each time its value is set, and it should be treated as a form with a submit button.

</td></tr> <tr><td>

type

</td><td>

</td><td>

TType

</td><td>

The current location type (where in the Uniform app the mesh app is rendering)

</td></tr> <tr><td>

value

</td><td>

</td><td>

TValue

</td><td>

The current value of the location. Some locations have fixed types (i.e. dataType), and others have user-selected types (i.e. paramType)

</td></tr> </tbody></table>