Open Pioneer Trails Packages
    Preparing search index...

    Configures a column in the result list component.

    A column typically renders a property from the underlying feature.

    interface ResultColumn {
        displayName?: string;
        getPropertyValue?: (feature: BaseFeature) => unknown;
        id?: string;
        propertyName?: string;
        renderCell?: (context: RenderCellContext) => ReactNode;
        width?: number;
    }
    Index

    Properties

    displayName?: string

    The display name of this column.

    If no displayName has been configured, propertyName will serve as a fallback value. If propertyName is also undefined, no column header will be rendered at all.

    getPropertyValue?: (feature: BaseFeature) => unknown

    Define this function to return a custom property value for this column.

    This can be used to create derived columns (by combining multiple properties into one value) or to create columns for property that don't exist directly on the feature.

    The return value of this function will be rendered by the table.

    id?: string

    Use this option to define an explicit column id. This can be helpful to track your column when it moves in the table (for example, the sort order can be maintained).

    If this is not defined, propertyName will serve as a fallback. If that is also not defined, the column index will be used instead.

    It is recommended to specify an id, if no propertyName has been set, because the column index fallback is not advised.

    propertyName?: string

    The property name to render.

    The value is expected to be available as feature.properties[propertyName].

    See also getPropertyValue.

    renderCell?: (context: RenderCellContext) => ReactNode

    Custom render function to render a table cell in this column.

    width?: number

    The width of this column, in pixels.