Skip to content

Commit 535cc57

Browse files
committed
Replaced textbox with Searchbox for filtering
1 parent 81d88bb commit 535cc57

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/controls/folderExplorer/FolderExplorer/FolderExplorer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { IFolder, IFolderExplorerService } from '../../../services/IFolderExplor
99
import { NewFolder } from "../NewFolder";
1010
import { Breadcrumb, IBreadcrumbItem } from "office-ui-fabric-react/lib/Breadcrumb";
1111
import * as telemetry from '../../../common/telemetry';
12+
import { SearchBox } from 'office-ui-fabric-react/lib/SearchBox';
1213

1314

1415
export class FolderExplorer extends React.Component<IFolderExplorerProps, IFolderExplorerState> {
@@ -52,7 +53,7 @@ export class FolderExplorer extends React.Component<IFolderExplorerProps, IFolde
5253
<div style={{ opacity: this.state.foldersLoading ? 0.8 : 1, }}>
5354
{!this.props.hiddenFilterBox && this._allFolders.length > 0 &&
5455
<div>
55-
<TextField className={styles.filterBox} placeholder={strings.FolderFilterBoxPlaceholder} onChanged={this._onChangeFilterText} />
56+
<SearchBox className={styles.filterBox} placeholder={strings.FolderFilterBoxPlaceholder} onSearch={this._onChangeFilterText} onChange={this._onChangeFilterText} />
5657
</div>
5758
}
5859
{this.state.folders.length === 0 &&

src/controls/listView/ListView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { FileTypeIcon, IconType } from '../fileTypeIcon/index';
77
import * as strings from 'ControlStrings';
88
import { IGroupsItems } from './IListView';
99
import * as telemetry from '../../common/telemetry';
10-
import { TextField } from 'office-ui-fabric-react/lib/components/TextField';
1110
import filter = require('lodash/filter');
11+
import { SearchBox } from 'office-ui-fabric-react/lib/SearchBox';
1212

1313
/**
1414
* File type icon component
@@ -517,7 +517,7 @@ export class ListView extends React.Component<IListViewProps, IListViewState> {
517517
return (
518518
<div>
519519
{
520-
showFilter && <TextField placeholder={filterPlaceHolder || strings.ListViewFilterLabel} onChanged={this._updateFilterValue} value={filterValue}/>
520+
showFilter && <SearchBox placeholder={filterPlaceHolder || strings.ListViewFilterLabel} onSearch={this._updateFilterValue} onChange={this._updateFilterValue} value={filterValue}/>
521521
}
522522
<DetailsList
523523
key="ListViewControl"

0 commit comments

Comments
 (0)