fix(plugin-chart-handlebars): fix overflow, debounce and control reset (#19879)

* fix(plugin-chart-handlebars): fix overflow

* add debounce, fix reset controls

* fix deps

* remove redundant code

* improve examples

* add last missing resetOnHides

* fix test

* use isPlainObject
This commit is contained in:
Ville Brofeldt
2022-04-28 16:38:23 +03:00
committed by GitHub
parent 1d50665da0
commit d5ea537b0e
15 changed files with 56 additions and 171 deletions

View File

@@ -16,8 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
import { debounce } from 'lodash';
import { formatSelectOptions } from '@superset-ui/chart-controls';
import { addLocaleData, t } from '@superset-ui/core';
import { addLocaleData, SLOW_DEBOUNCE, t } from '@superset-ui/core';
import i18n from './i18n';
addLocaleData(i18n);
@@ -35,3 +36,8 @@ export const PAGE_SIZE_OPTIONS = formatSelectOptions<number>([
100,
200,
]);
export const debounceFunc = debounce(
(func: (val: string) => void, source: string) => func(source),
SLOW_DEBOUNCE,
);