mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
🛠 fix icon page autoFocus when collapse demos
close #24911 close #24932 close #20354
This commit is contained in:
parent
dc9d86bba6
commit
ba992d2c83
@ -9,6 +9,10 @@ import Demo from './Demo';
|
||||
import EditButton from './EditButton';
|
||||
import { ping, getMetaDescription } from '../utils';
|
||||
|
||||
const ComponentInMarkdown = React.memo(({ content, utils }) =>
|
||||
utils.toReactComponent(['section', { className: 'markdown' }].concat(getChildren(content))),
|
||||
);
|
||||
|
||||
class ComponentDoc extends React.Component {
|
||||
state = {
|
||||
expandAll: false,
|
||||
@ -165,9 +169,7 @@ class ComponentDoc extends React.Component {
|
||||
filename={filename}
|
||||
/>
|
||||
</h1>
|
||||
{utils.toReactComponent(
|
||||
['section', { className: 'markdown' }].concat(getChildren(content)),
|
||||
)}
|
||||
<ComponentInMarkdown utils={utils} content={content} />
|
||||
<h2>
|
||||
<FormattedMessage id="app.component.examples" />
|
||||
<span className="all-code-box-controls">
|
||||
|
@ -28,7 +28,7 @@ interface IconDisplayState {
|
||||
searchKey: string;
|
||||
}
|
||||
|
||||
class IconDisplay extends React.Component<IconDisplayProps, IconDisplayState> {
|
||||
class IconDisplay extends React.PureComponent<IconDisplayProps, IconDisplayState> {
|
||||
static categories: Categories = categories;
|
||||
|
||||
static newIconNames: string[] = [];
|
||||
@ -43,6 +43,10 @@ class IconDisplay extends React.Component<IconDisplayProps, IconDisplayState> {
|
||||
this.handleSearchIcon = debounce(this.handleSearchIcon, 300);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
console.log('componentDidMount');
|
||||
}
|
||||
|
||||
handleChangeTheme = (e: RadioChangeEvent) => {
|
||||
this.setState({
|
||||
theme: e.target.value as ThemeType,
|
||||
|
Loading…
Reference in New Issue
Block a user