update
add search and refresh add lazyload fix ui
This commit is contained in:
16
src/App.js
16
src/App.js
@@ -2,6 +2,7 @@ import React, {Component} from 'react';
|
||||
import {Flow} from './Flows';
|
||||
import {Title} from './Title';
|
||||
import {Sidebar} from './Sidebar';
|
||||
import {ControlBar} from './ControlBar';
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
@@ -9,6 +10,8 @@ class App extends Component {
|
||||
this.state={
|
||||
sidebar_title: null,
|
||||
sidebar_content: null,
|
||||
search_text: null,
|
||||
flow_render_key: +new Date(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,12 +22,23 @@ class App extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
set_search_text(text) {
|
||||
this.setState({
|
||||
search_text: text,
|
||||
flow_render_key: +new Date(),
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<div className="bg-img" />
|
||||
<Title callback={this.show_sidebar.bind(this)} />
|
||||
<div className="left-container">
|
||||
<Flow callback={this.show_sidebar.bind(this)} mode="list" />
|
||||
<ControlBar set_search_text={this.set_search_text.bind(this)} />
|
||||
<Flow key={this.state.flow_render_key}
|
||||
callback={this.show_sidebar.bind(this)} search_text={this.state.search_text}
|
||||
/>
|
||||
</div>
|
||||
<Sidebar do_close={()=>{
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user