Fix TS for vis_type_table (#58347)

* Remove eslint overrides for vis_type_table

* Fix TS for vis_type_table

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Maryia Lapata 2020-02-26 13:20:24 +03:00 committed by GitHub
parent a4e82c4e6d
commit 39f6eaf5f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions

View file

@ -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}',

View file

@ -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 (
@ -64,7 +64,7 @@ function TableOptions({
) {
setValue('percentageCol', percentageColumns[0].value);
}
}, [percentageColumns, stateParams.percentageCol]);
}, [percentageColumns, stateParams.percentageCol, setValidity, setValue]);
return (
<EuiPanel paddingSize="s">