You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/05/11 04:20:16 UTC

[GitHub] [echarts] pissang commented on a change in pull request #14775: fix(dataZoom): type fix for startValue and endValue. close #14412

pissang commented on a change in pull request #14775:
URL: https://github.com/apache/echarts/pull/14775#discussion_r629834775



##########
File path: src/component/dataZoom/DataZoomModel.ts
##########
@@ -506,9 +506,12 @@ class DataZoomModel<Opts extends DataZoomOption = DataZoomOption> extends Compon
 
     setCalculatedRange(opt: RangeOption): void {
         const option = this.option;
-        each(['start', 'startValue', 'end', 'endValue'] as const, function (name) {
+        each(['start', 'end'] as const, function (name) {
             option[name] = opt[name];

Review comment:
       It's fine to use `(option as any)[name] = opt[name]` here to avoid writing the logic twice. Code size is also important.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org