Skip to content

Commit

Permalink
feat: setting limit value when Pie chart switches (#20392)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie authored Jun 15, 2022
1 parent 7c252d7 commit 0a50a9b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t, validateNonEmpty } from '@superset-ui/core';
import { ensureIsInt, t, validateNonEmpty } from '@superset-ui/core';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
Expand Down Expand Up @@ -257,6 +257,8 @@ const config: ControlPanelConfig = {
...formData,
metric: formData.standardizedFormData.standardizedState.metrics[0],
groupby: formData.standardizedFormData.standardizedState.columns,
row_limit:
ensureIsInt(formData.row_limit, 100) >= 100 ? 100 : formData.row_limit,
}),
};

Expand Down

0 comments on commit 0a50a9b

Please sign in to comment.