Skip to content

Commit b5cdceb

Browse files
authored
Fix slider sync issue (#443)
1 parent e209b77 commit b5cdceb

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/base/src/formbuilder/objectform/baseform.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
import { Slider } from '@jupyter/react-components';
2+
import { IJupyterGISModel, SourceType } from '@jupytergis/schema';
3+
import { Dialog } from '@jupyterlab/apputils';
14
import { FormComponent } from '@jupyterlab/ui-components';
2-
import validatorAjv8 from '@rjsf/validator-ajv8';
5+
import { Signal } from '@lumino/signaling';
36
import { IChangeEvent, ISubmitEvent } from '@rjsf/core';
7+
import validatorAjv8 from '@rjsf/validator-ajv8';
48
import * as React from 'react';
5-
import { IJupyterGISModel } from '@jupytergis/schema';
6-
import { Dialog } from '@jupyterlab/apputils';
7-
import { Signal } from '@lumino/signaling';
89
import { deepCopy } from '../../tools';
910
import { IDict } from '../../types';
10-
import { Slider } from '@jupyter/react-components';
11-
import { SourceType } from '@jupytergis/schema';
1211

1312
export interface IBaseFormStates {
1413
schema?: IDict;
@@ -214,7 +213,7 @@ export class BaseForm extends React.Component<IBaseFormProps, IBaseFormStates> {
214213
min={1}
215214
max={10}
216215
step={1}
217-
value={props.formData * 10}
216+
valueAsNumber={props.formData * 10}
218217
onChange={handleSliderChange}
219218
></Slider>
220219
<input

0 commit comments

Comments
 (0)