admin管理员组文章数量:1317909
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
本文标签: pluginsWordPress Gutenberg How to make TextControl Required
版权声明:本文标题:plugins - WordPress Gutenberg How to make TextControl Required? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742011326a2412936.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论