fix(plugin-workflow): fix assignees config component in manual node (#1547)
This commit is contained in:
parent
aa3ca7a959
commit
313217a671
@ -14,12 +14,13 @@ export type RemoteSelectProps<P = any> = SelectProps<P, any> & {
|
|||||||
onChange?: (v: any) => void;
|
onChange?: (v: any) => void;
|
||||||
target: string;
|
target: string;
|
||||||
wait?: number;
|
wait?: number;
|
||||||
|
manual?: boolean;
|
||||||
service: ResourceActionOptions<P>;
|
service: ResourceActionOptions<P>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const InternalRemoteSelect = connect(
|
const InternalRemoteSelect = connect(
|
||||||
(props: RemoteSelectProps) => {
|
(props: RemoteSelectProps) => {
|
||||||
const { fieldNames = {}, service = {}, wait = 300, value, objectValue, ...others } = props;
|
const { fieldNames = {}, service = {}, wait = 300, value, objectValue, manual = true, ...others } = props;
|
||||||
const compile = useCompile();
|
const compile = useCompile();
|
||||||
const firstRun = useRef(false);
|
const firstRun = useRef(false);
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ const InternalRemoteSelect = connect(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
manual: true,
|
manual,
|
||||||
debounceWait: wait,
|
debounceWait: wait,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -375,7 +375,7 @@ export function NodeDefaultView(props) {
|
|||||||
type: 'void',
|
type: 'void',
|
||||||
properties: {
|
properties: {
|
||||||
...(instruction.view ? { view: instruction.view } : {}),
|
...(instruction.view ? { view: instruction.view } : {}),
|
||||||
config: {
|
button: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
'x-content': detailText,
|
'x-content': detailText,
|
||||||
'x-component': Button,
|
'x-component': Button,
|
||||||
|
@ -26,9 +26,10 @@ export function AssigneesSelect({ multiple = false, value = [], onChange }) {
|
|||||||
service={{
|
service={{
|
||||||
resource: 'users'
|
resource: 'users'
|
||||||
}}
|
}}
|
||||||
|
manual={false}
|
||||||
value={value[0]}
|
value={value[0]}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
onChange([v]);
|
onChange(v != null ? [v] : []);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Variable.Input>
|
</Variable.Input>
|
||||||
|
@ -41,13 +41,6 @@ export default {
|
|||||||
'x-component': 'AssigneesSelect',
|
'x-component': 'AssigneesSelect',
|
||||||
'x-component-props': {
|
'x-component-props': {
|
||||||
// multiple: true,
|
// multiple: true,
|
||||||
// fieldNames: {
|
|
||||||
// label: 'nickname',
|
|
||||||
// value: 'id',
|
|
||||||
// },
|
|
||||||
// service: {
|
|
||||||
// resource: 'users'
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
default: [],
|
default: [],
|
||||||
|
Loading…
Reference in New Issue
Block a user