mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 09:52:34 +01:00
explicitly set active field by default
This commit is contained in:
parent
5db5fb3730
commit
c5097c27fc
2 changed files with 8 additions and 12 deletions
|
|
@ -52,10 +52,7 @@ export function attachToForm(Control): any {
|
|||
const fullPath = [...formPath, name];
|
||||
const fullPathFlatten = flattenPath(fullPath);
|
||||
|
||||
const onChange = value => {
|
||||
console.log(fullPath + " : " + value);
|
||||
formEdit.onChange(fullPath, value);
|
||||
}
|
||||
const onChange = value => formEdit.onChange(fullPath, value);
|
||||
const setActive = (isActive) => formEdit.setActive(fullPathFlatten, isActive);
|
||||
|
||||
const value = params[name];
|
||||
|
|
|
|||
|
|
@ -91,17 +91,16 @@ export function activate(ctx: ApplicationContext) {
|
|||
disposerList = createFunctionList();
|
||||
}
|
||||
|
||||
if (curr !== null && old?.requestKey !== curr.requestKey) {
|
||||
const newState: WizardState = {};
|
||||
if (curr) {
|
||||
const op = ctx.operationService.get(curr.type);
|
||||
if (op.defaultActiveField) {
|
||||
newState.activeParam = op.defaultActiveField;
|
||||
}
|
||||
const newState: WizardState = {};
|
||||
|
||||
if (curr) {
|
||||
const op = ctx.operationService.get(curr.type);
|
||||
if (op.defaultActiveField) {
|
||||
newState.activeParam = op.defaultActiveField;
|
||||
}
|
||||
state$.next(newState);
|
||||
}
|
||||
|
||||
state$.next(newState);
|
||||
})
|
||||
|
||||
const updateParams = mutator => workingRequest$.update((req: WorkingRequest) => produce(req, draft => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue