@aliretail/react-materials-components
Version:
44 lines (40 loc) • 989 B
Markdown
title: Filter-Simple
order: 1
默认按钮渲染
```jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Filter } from '@aliretail/react-materials-components';
import { Input } from '@alifd/next';
class Demo extends React.Component {
render() {
return (
<div>
<h2>渲染默认按钮</h2>
<Filter
key='1'
showDefaultButton={true}
buttons={{
onSearch(e) {
console.log('search', e);
},
onReset(e) {
console.log('reset', e);
}
}}
>
<Input style={{ width: '100%' }} />
<Input style={{ width: '100%' }} />
<Input style={{ width: '100%' }} />
<Input style={{ width: '100%' }} />
<Input style={{ width: '100%' }} />
<Input style={{ width: '100%' }} />
</Filter>
</div>
);
}
}
ReactDOM.render(<Demo />, mountNode);
```