Skip to content

Commit

Permalink
fix: debounce & numberinput
Browse files Browse the repository at this point in the history
  • Loading branch information
ikun97 authored and shanexi committed Sep 20, 2024
1 parent c9c1db1 commit 4d4c335
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions web/apps/web/src/stores/workflow/utils/data-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export const genReactFlow: (
if (workflow.type === 'workflow') {
// start节点
let x = 0;
const y = 0;
const y = 100;
nodes.push({
id: NodeIdEnum.start,
type: NodeTypeEnum.start,
Expand Down Expand Up @@ -341,7 +341,7 @@ export const genReactFlow: (
nodes,
edges,
viewport: {
x: 0,
x: 100,
y: 100,
zoom: 0.4,
},
Expand Down
2 changes: 1 addition & 1 deletion web/packages/form-engine/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const FormEngine = forwardRef<FormRef, IFormEngineProps>((props, ref) => {
if (onChange) {
onChange(values);
}
}, 500),
}, 300),
);

return () => subscription.unsubscribe();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ export function calculateNearestValue(
const decimalBaseValue = new Decimal(baseValue);
const decimalStep = new Decimal(step);
nearestValue = decimalBaseValue.add(finalSteps.times(decimalStep)).toNumber();
return nearestValue;
return Number.isNaN(nearestValue) ? value : nearestValue;
}

0 comments on commit 4d4c335

Please sign in to comment.