I want to make this field required. Can anyone suggest how to do it?
<TextControl
tagName="p"
label="url"
placeholder="http://"
focus = {focus}
className="full-width "
value={ props.attributes.url }
onChange={ onChangeurl }
keepPlaceholderOnFocus= {true}
/>
I want to make this field required. Can anyone suggest how to do it?
<TextControl
tagName="p"
label="url"
placeholder="http://"
focus = {focus}
className="full-width "
value={ props.attributes.url }
onChange={ onChangeurl }
keepPlaceholderOnFocus= {true}
/>
Share
Improve this question
edited Aug 11, 2020 at 7:59
cjbj
15k16 gold badges42 silver badges89 bronze badges
asked Aug 10, 2020 at 21:44
Mangesh YadavMangesh Yadav
431 silver badge7 bronze badges
1 Answer
Reset to default 0This could possibly done using lockPostSaving
Some code example ➡ https://github/WordPress/gutenberg/pull/16713