Skip to content

useArtifacts should support setValue/dismiss/etc by ID instead of by type #131

@barbinbrad

Description

@barbinbrad

If we have multiple artifacts of the same type, it is impossible to set the current artifact to be a specific artifact. A better API for actions might be:

interface UseArtifactsActions {
    setValue: (value: string | null) => void;
    dismiss: (type: string) => void;
    restore: (type: string) => void;
    setValueById: (id: string | null) => void;
    dismissById: (id: string) => void;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions