This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinline.tsx
More file actions
51 lines (48 loc) · 1.88 KB
/
inline.tsx
File metadata and controls
51 lines (48 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* DropDownList Inline Sample
*/
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { DropDownListComponent } from '@syncfusion/ej2-react-dropdowns';
import { SampleBase } from '../common/sample-base';
import './inline.css';
export class Inline extends SampleBase<{}, {}> {
private listObj: DropDownListComponent;
// define the JSON of data
private employeesData: { [key: string]: Object }[] = [
{ Name: 'Andrew', Eimg: '7' },
{ Name: 'Anne', Eimg: '1' },
{ Name: 'Janet', Eimg: '3' },
{ Name: 'Laura', Eimg: '2' },
{ Name: 'Michael', Eimg: '9' },
{ Name: 'Nancy', Eimg: '4' },
{ Name: 'Robert', Eimg: '8' },
{ Name: 'Steven', Eimg: '10' }
];
// maps the appropriate column to fields property
private fields: object = { text: 'Name' };
render() {
return (
<div className='control-pane'>
<div className='control-section' id='inline-container'>
<div id='inline' style= {{ paddingTop: '75px'}} >
<span id="contentText">React top expert of this week is
<DropDownListComponent id="inline" cssClass="inlinecss" dataSource={this.employeesData} fields={this.fields} placeholder="Select an employee" popupHeight="200px" width="60px" popupWidth="140px" value='Michael' />
</span>
</div>
</div>
<div id="action-description">
<p>The DropDownList appearing in line with highlighted content. Click that DropDownList value content and select an item
from the popup list.
</p>
</div>
<div id="description">
<p>The DropDownList component can be rendered in line with other content and you can override the styles of the dropdownlist
component.
</p>
<p>This sample illustrates using the user's data that has been used and customized DropDownList border.</p>
</div>
</div>
);
}
}