Input: new method select(), passed to underlying input #11906
Conversation
Deploy preview for ant-design ready! Built with commit 667636d |
Codecov Report
@@ Coverage Diff @@
## feature-3.9.0 #11906 +/- ##
=================================================
+ Coverage 92.19% 92.19% +<.01%
=================================================
Files 206 206
Lines 5395 5397 +2
Branches 1512 1512
=================================================
+ Hits 4974 4976 +2
Misses 417 417
Partials 4 4
Continue to review full report at Codecov.
|
Could you add a test case? |
@afc163 I thought about that, but what should be tested? I could check via selection API if the whole text is selected after Or - see "side question" above - we should document |
Checking |
Just added the test. Do you / does anyone have an opinion on the "input" member variable? I need to know this because I need the button to expose a focus() method. I will submit an PR for this after this PR here is done. Depending on an "official" reasoning on such reference member vars, I would introduce (and document) such a member variable for Button aswell. |
d47a5be
into
ant-design:feature-3.9.0
New method
select
which is passed on to the underlying input element. Similar tofocus
andblur
.Added no documentation and no demo because
focus
andblur
weren't documented/demoed.Side question: the underlying input is stored in
input
member variable. This variable isn't officially documented, but defined in TypeScript interface. So is accessing it from outside officially supported and safe, or is this an unsupported feature?master
, feature for latest active branchfeature-x.x
.npm run lint
and fix those errors before submitting in order to keep consistent code style.Update API docs for the component.Update/Add demo to demonstrate new feature.Add unit tests for the feature.