Skip to content

Commit

Permalink
Fix TS for vis_type_table (#58347)
Browse files Browse the repository at this point in the history
* Remove eslint overrides for vis_type_table

* Fix TS for vis_type_table

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
maryia-lapata and elasticmachine authored Feb 26, 2020
1 parent a4e82c4 commit 39f6eaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ module.exports = {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/core_plugins/vis_type_table/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: [
'src/legacy/core_plugins/vis_default_editor/public/components/controls/**/*.{ts,tsx}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ function TableOptions({
.filter(col => get(col.aggConfig.type.getFormat(col.aggConfig), 'type.id') === 'number')
.map(({ name }) => ({ value: name, text: name })),
],
[aggs, stateParams.percentageCol, stateParams.dimensions]
[aggs]
);

const isPerPageValid = stateParams.perPage === '' || stateParams.perPage > 0;

useEffect(() => {
setValidity(isPerPageValid);
}, [isPerPageValid]);
}, [isPerPageValid, setValidity]);

useEffect(() => {
if (
Expand All @@ -64,7 +64,7 @@ function TableOptions({
) {
setValue('percentageCol', percentageColumns[0].value);
}
}, [percentageColumns, stateParams.percentageCol]);
}, [percentageColumns, stateParams.percentageCol, setValidity, setValue]);

return (
<EuiPanel paddingSize="s">
Expand Down

0 comments on commit 39f6eaf

Please sign in to comment.