mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-26 12:18:21 +00:00
修正arraysetter 排序写入schema的问题
This commit is contained in:
parent
9fa5b91400
commit
eb525ad15a
@ -72,11 +72,18 @@ export class ListSetter extends Component<ArraySetterProps, ArraySetterState> {
|
|||||||
|
|
||||||
onSort(sortedIds: Array<string | number>) {
|
onSort(sortedIds: Array<string | number>) {
|
||||||
const { itemsMap } = this.state;
|
const { itemsMap } = this.state;
|
||||||
|
const { onChange } = this.props;
|
||||||
const items = sortedIds.map((id, index) => {
|
const items = sortedIds.map((id, index) => {
|
||||||
const item = itemsMap.get(id)!;
|
const item = itemsMap.get(id)!;
|
||||||
item.setKey(index);
|
// item.setKey(index);
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const values = items.map((item) => {
|
||||||
|
return item.getValue();
|
||||||
|
});
|
||||||
|
console.log('values',values);
|
||||||
|
onChange(values);
|
||||||
this.setState({
|
this.setState({
|
||||||
items,
|
items,
|
||||||
});
|
});
|
||||||
@ -253,6 +260,7 @@ export default class ArraySetter extends Component<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mode === 'popup' || forceInline) {
|
if (mode === 'popup' || forceInline) {
|
||||||
|
|
||||||
const title = (
|
const title = (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
编辑:
|
编辑:
|
||||||
@ -270,6 +278,7 @@ export default class ArraySetter extends Component<{
|
|||||||
}
|
}
|
||||||
this.pipe = (this.context as PopupPipe).create({ width });
|
this.pipe = (this.context as PopupPipe).create({ width });
|
||||||
}
|
}
|
||||||
|
|
||||||
this.pipe.send(<TableSetter key={field.id} {...props} columns={columns} />, title);
|
this.pipe.send(<TableSetter key={field.id} {...props} columns={columns} />, title);
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user