ant-design/components/mentions/demo/readonly.tsx
黑雨 67ee019478
Mentions data driven (#38630)
* feat: reset and force update

* feat: update package

* feat: reset

* feat: update for viewer

* feat: update for viewer

* feat: update for viewer

* feat: update for viewer

* feat: update for viewer

* update doc

* feat: add waring

* feat: update doc

* feat: add test case
2022-11-21 21:34:23 +08:00

30 lines
576 B
TypeScript

import React from 'react';
import { Mentions } from 'antd';
const options = ['afc163', 'zombiej', 'yesmeck'].map((value) => ({
value,
key: value,
label: value,
}));
const App: React.FC = () => (
<>
<div style={{ marginBottom: 10 }}>
<Mentions
style={{ width: '100%' }}
placeholder="this is disabled Mentions"
disabled
options={options}
/>
</div>
<Mentions
style={{ width: '100%' }}
placeholder="this is readOnly Mentions"
readOnly
options={options}
/>
</>
);
export default App;