Till I discover ways to construct my very own react parts for the block editor, I wish to request an enter with button element for the block editor, particularly for the InspectorTools space. In the meanwhile I’m fairly hackishly making a TextControl element enter, then making a Button element (which nonetheless, despite the fact that being a baby of the identical PanelRow element, will not be an instantaneous sibling of the textual content enter, however moderately of the div mum or dad of the textual content enter). Then when the InspectorControls are rendered (upon clicking on my registered block) I’m utilizing jQuery to maneuver the button and place it subsequent to the enter as an instantaneous sibling. This appears to me to be fairly a hackish method, it will be good to have this type of element within the WordPress block editor… Mainly I am not utilizing any onChange occasions on the TextControl enter, I am solely utilizing the Button element’s onClick occasion.
I perceive this can be a fairly particular use case, mainly this can be a search enter, clicking on the button will collect outcomes from an exterior service based mostly on the textual content enter, after which the consumer (web site admin / editor) will have the ability to select components from the outcomes to insert into the gutenberg block.
Here’s a screenshot of my hackish consequence.