Skip to content

Make it so <Prompt> can be disabled, and/or is aware of its inner control being disabled and acts accordingly. #182

@groberts314

Description

@groberts314

Do you want to request a feature or report a bug?
You could see it as either a Bug or a new Feature request/enhancement.

What is the current behavior?
<Prompt> component has no way to be disabled, and is not smart about disable property of its inner control. Presently, logic is required on the consumer's side to ensure <Prompt> does not invoke onClick if the inner control is disabled. See, for example https://github.com/saddlebackdev/church-management/pull/3734.

If the current behavior is a bug, please provide the steps to reproduce.
Use a <Prompt> component with an inner control (e.g. a <Button>) that has disable prop set to true. Click the (disabled) button. Prompt is spawned. Expected behavior is that clicking a disabled Button or any other control, e.g. a "Link Button" (<A> or clickable <div> or <span>), etc. that has been disabled has no effect whatsoever. For such a control wrapped in a <Prompt>, clicking it should not open the <Prompt>.

Which version of react-cm-ui, and which browser / OS are affected by this issue? Did this work in previous versions of react-cm-ui?
React CM UI 9.13.3 (in HC release/1.27.0 branch). As far as I know, this has been the case for all prior versions of React CM UI.
This is not OS or browser-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions