|
|
@ -32,19 +32,19 @@ export function RemixUiVerticalIconsPanel ({ |
|
|
|
}: RemixUiVerticalIconsPanelProps) { |
|
|
|
}: RemixUiVerticalIconsPanelProps) { |
|
|
|
const scrollableRef = useRef<any>() |
|
|
|
const scrollableRef = useRef<any>() |
|
|
|
const iconPanelRef = useRef<any>() |
|
|
|
const iconPanelRef = useRef<any>() |
|
|
|
const [activateScroll, dispatchScrollAction] = useReducer(verticalScrollReducer,initialState) |
|
|
|
const [activateScroll, dispatchScrollAction] = useReducer(verticalScrollReducer, initialState) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
const evaluateScrollability = (evt: any) => { |
|
|
|
const evaluateScrollability = (evt: any) => { |
|
|
|
console.log('resize event answered by dispatch!') |
|
|
|
console.log('resize event answered by dispatch!') |
|
|
|
dispatchScrollAction({ |
|
|
|
dispatchScrollAction({ |
|
|
|
type: 'resize', |
|
|
|
type: 'resize', |
|
|
|
payload: { |
|
|
|
payload: { |
|
|
|
scrollHeight: document.querySelector('#remixuiScrollable')?.scrollHeight, |
|
|
|
scrollHeight: document.querySelector('#remixuiScrollable')?.scrollHeight, |
|
|
|
clientHeight: document.querySelector('#remixuiScrollable')?.clientHeight, |
|
|
|
clientHeight: document.querySelector('#remixuiScrollable')?.clientHeight, |
|
|
|
scrollState: false |
|
|
|
scrollState: false |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
addEventListener('resize', evaluateScrollability) |
|
|
|
addEventListener('resize', evaluateScrollability) |
|
|
|
|
|
|
|
|
|
|
@ -54,7 +54,7 @@ export function RemixUiVerticalIconsPanel ({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
addEventListener('activate', () => console.log('activate called now')) |
|
|
|
addEventListener('activate', () => console.log('activate called now')) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
function onThemeChanged (themeType: any) { |
|
|
|
function onThemeChanged (themeType: any) { |
|
|
|