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;
 | 
			
		||||
  target: string;
 | 
			
		||||
  wait?: number;
 | 
			
		||||
  manual?: boolean;
 | 
			
		||||
  service: ResourceActionOptions<P>;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const InternalRemoteSelect = connect(
 | 
			
		||||
  (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 firstRun = useRef(false);
 | 
			
		||||
 | 
			
		||||
@ -36,7 +37,7 @@ const InternalRemoteSelect = connect(
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        manual: true,
 | 
			
		||||
        manual,
 | 
			
		||||
        debounceWait: wait,
 | 
			
		||||
      },
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
@ -375,7 +375,7 @@ export function NodeDefaultView(props) {
 | 
			
		||||
              type: 'void',
 | 
			
		||||
              properties: {
 | 
			
		||||
                ...(instruction.view ? { view: instruction.view } : {}),
 | 
			
		||||
                config: {
 | 
			
		||||
                button: {
 | 
			
		||||
                  type: 'void',
 | 
			
		||||
                  'x-content': detailText,
 | 
			
		||||
                  'x-component': Button,
 | 
			
		||||
 | 
			
		||||
@ -26,9 +26,10 @@ export function AssigneesSelect({ multiple = false, value = [], onChange }) {
 | 
			
		||||
        service={{
 | 
			
		||||
          resource: 'users'
 | 
			
		||||
        }}
 | 
			
		||||
        manual={false}
 | 
			
		||||
        value={value[0]}
 | 
			
		||||
        onChange={(v) => {
 | 
			
		||||
          onChange([v]);
 | 
			
		||||
          onChange(v != null ? [v] : []);
 | 
			
		||||
        }}
 | 
			
		||||
      />
 | 
			
		||||
    </Variable.Input>
 | 
			
		||||
 | 
			
		||||
@ -41,13 +41,6 @@ export default {
 | 
			
		||||
      'x-component': 'AssigneesSelect',
 | 
			
		||||
      'x-component-props': {
 | 
			
		||||
        // multiple: true,
 | 
			
		||||
        // fieldNames: {
 | 
			
		||||
        //   label: 'nickname',
 | 
			
		||||
        //   value: 'id',
 | 
			
		||||
        // },
 | 
			
		||||
        // service: {
 | 
			
		||||
        //   resource: 'users'
 | 
			
		||||
        // },
 | 
			
		||||
      },
 | 
			
		||||
      required: true,
 | 
			
		||||
      default: [],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user