king
2023-12-12 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import React, {Component} from 'react'
import { Input } from 'antd'
 
const { Search } = Input
 
class MKSearchInput extends Component {
  render() {
    const { config, onChange, onInputSubmit } = this.props
 
    if (config.inputType === 'search') {
      return <Search defaultValue={config.initval} allowClear placeholder={config.labelShow === 'false' ? config.label : ''} autoComplete="off" onChange={onChange} onSearch={onInputSubmit} enterButton/>
    } else {
      return <Input defaultValue={config.initval} allowClear placeholder={config.labelShow === 'false' ? config.label : ''} autoComplete="off" onChange={onChange} onPressEnter={onInputSubmit} />
    }
  }
}
 
export default MKSearchInput