Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 6b830ee

Browse files
fix build
1 parent bd67ee6 commit 6b830ee

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/src/examples/components/Toolbar/Content/ToolbarExampleOverflow.shorthand.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const ToolbarExampleOverflow = () => (
1515
},
1616
..._.times(20, i => ({ key: `b${i}`, icon: icons[i % icons.length] })),
1717
]}
18-
1918
onReduceItems={items => {
2019
return items.slice(0, -1)
2120
}}

packages/react/src/components/ResponsiveToolbar/ResponsiveToolbar.tsx

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,24 @@ class ResponsiveToolbar extends React.Component<ResponsiveToolbarProps, Responsi
6666

6767
afterComponentRendered() {
6868
console.log('rendered')
69-
window.requestAnimationFrame(() => {
70-
if (this.containerRef.current) {
71-
const { fits, measurements } = this.measureOverflow(this.containerRef.current)
72-
this.setState(({ items }) => {
73-
if (fits) {
74-
return { stable: true, stableItems: items }
75-
}
76-
77-
const reducedItems = this.props.reduceItems(items, measurements)
78-
79-
if (reducedItems === null) {
80-
// consumer refused to reduce further
81-
return { stable: true, stableItems: items }
82-
}
83-
return { items: reducedItems }
84-
})
85-
}
86-
})
69+
// window.requestAnimationFrame(() => {
70+
// if (this.containerRef.current) {
71+
// const { fits } = this.measureOverflow(this.containerRef.current)
72+
// this.setState(({ items }) => {
73+
// if (fits) {
74+
// return { stable: true, stableItems: items }
75+
// }
76+
//
77+
// const reducedItems = this.props.reduceItems(items)
78+
//
79+
// if (reducedItems === null) {
80+
// // consumer refused to reduce further
81+
// return { stable: true, stableItems: items }
82+
// }
83+
// return { items: reducedItems }
84+
// })
85+
// }
86+
// })
8787
}
8888

8989
measureOverflow(container: HTMLElement) {
@@ -115,6 +115,7 @@ class ResponsiveToolbar extends React.Component<ResponsiveToolbarProps, Responsi
115115
}
116116

117117
render() {
118+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
118119
const { reduceItems, ...toolbarProps } = this.props
119120

120121
return (

0 commit comments

Comments
 (0)