block-components icon indicating copy to clipboard operation
block-components copied to clipboard

Add "disabled" prop to ContentSearch

Open xavortm opened this issue 2 years ago • 0 comments

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

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

xavortm avatar Sep 20 '23 13:09 xavortm