Skip to content

Commit da2eb27

Browse files
committed
[ML] fix default value
1 parent 5c2671c commit da2eb27

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

x-pack/plugins/ml/public/application/explorer/select_limit/select_limit.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { act } from 'react-dom/test-utils';
99
import { shallow } from 'enzyme';
1010
import { SelectLimit } from './select_limit';
1111

12-
jest.useFakeTimers();
13-
1412
describe('SelectLimit', () => {
1513
test('creates correct initial selected value', () => {
1614
const wrapper = shallow(<SelectLimit />);

x-pack/plugins/ml/public/application/explorer/select_limit/select_limit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const defaultLimit = limitOptions[1];
2424
export const limit$ = new BehaviorSubject<number>(defaultLimit);
2525

2626
export const useSwimlaneLimit = (): [number, (newLimit: number) => void] => {
27-
const limit = useObservable(limit$);
27+
const limit = useObservable(limit$, defaultLimit);
2828

2929
return [limit!, (newLimit: number) => limit$.next(newLimit)];
3030
};

0 commit comments

Comments
 (0)