React Show / hide

clipboard.png

clipboard.png
when you add a new top level, there is no superior menu ID, to hide it
here I use a modal box

<Button icon="plus" type="primary" onClick={() => this.handleModalVisibleAdd(record)}>
  
</Button>
<Form>
  {/* {this.props.data.PARENT_ID ? (
    <FormItem
      {...formItemLayout}
      label="ID"
    >
      {getFieldDecorator("PARENT_ID", {
        initialValue: this.props.data.ID,
        rules: [{
          // required: true, message: "",
        }],
      })(
        <Input disabled />
      )}
    </FormItem>
  ) : null
  } */}

......

 </Form>

pasted part of the code to realize some problems
how to do it

Mar.05,2021

set a state value identity when the button is clicked.
is judged by this logo in Modal . This can be done through the ternary operator or & & .


<Form>
          {this.props.data.PARENT_ID && (
            <FormItem {...formItemLayout} label="ID">
              {getFieldDecorator('PARENT_ID', {
                initialValue: this.props.data.ID, rules: [{}],
              })(
                <Input disabled/>
              )}
            </FormItem>
          )}
        </Form>
Is that what

means? Want to use this.props.data.PARENT_ID to control your input ?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45bb7-43815.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45bb7-43815.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?