Skip to content

Add "disabled" prop to ContentSearch #265

@xavortm

Description

@xavortm

Is your enhancement related to a problem? Please describe.

I want to disable the ContentSearch for card items that are part of the query loop.

Example:

<ContentSearch
	label={__('Select a Post or Page', 'project')}
	contentTypes={['post']}
	onSelectItem={(post) => setAttributes({ selectedPost: post })}
	placeholder={__('Search for a post', 'project')}
	disabled={context.queryId != null}
/>

Designs

CleanShot 2023-09-20 at 16 17 34@2x

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned
    No fields configured for 🔨 Ready for Implementation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions