ant-design/components/mention/demo/placement.md
2018-12-20 17:21:58 +08:00

614 B

order title
0
zh-CN en-US
向上展开 Placement

zh-CN

向上展开建议。

en-US

Change the suggestions placement.

import { Mention } from 'antd';

const { toString } = Mention;

function onChange(contentState) {
  console.log(toString(contentState));
}

function onSelect(suggestion) {
  console.log('onSelect', suggestion);
}

ReactDOM.render(
  <Mention
    style={{ width: '100%' }}
    onChange={onChange}
    defaultSuggestions={['afc163', 'benjycui', 'yiminghe', 'RaoHai', '中文', 'にほんご']}
    onSelect={onSelect}
    placement="top"
  />,
  mountNode
);