-
-
Notifications
You must be signed in to change notification settings - Fork 818
Version 2 #824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 2 #824
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Awesome, thank you! 🎉 Just to let you know, I've started hitting a couple of I'm linking the (unfinished) migration PR in case you decide to take a look: https://github.com/jurerotar/Pillage-First-Ask-Questions-Later/pull/85/files#diff-8673c44e118179393fafa3d2a592a98c16dfbfe81c15ad1165491687db724423 Thank you again for your time answering my questions, really appreciate it! |
My guess is that you're passing something unstable to I wonder if there's a way I can detect and help make that more obvious (at least in DEV mode) 🤔 |
|
@smoores-dev Yeah, sorry. That is one of the things listed as "known issues" with the current release (in the PR description). Hoping to push out the next alpha with that and a few other things (like RTL support) soon. |
|
Ah, whoops, sorry for missing that! All good! |
Struggling a bit with this. I think it might be an issue with const [xAxisMapRulerRef, setXAxisMapRulerRef] = useGridCallbackRef(null);
const xAxisMapRulerProps = useRef<MapRulerCellProps>({ layout: 'horizontal' });
<Grid<MapRulerCellProps>
className="scrollbar-hidden"
gridRef={setXAxisMapRulerRef}
columnCount={gridSize}
columnWidth={tileSize}
rowCount={1}
rowHeight={20}
cellProps={xAxisMapRulerProps.current}
cellComponent={MapRulerCell}
/>Removing the Doing it like this; const xAxisMapRulerRef = useRef<GridImperativeAPI | null>(null);
const setXAxisMapRulerRef = useCallback((node: GridImperativeAPI) => {
if (node === null) {
return;
}
xAxisMapRulerRef.current = node;
}, []);works though. Would it make sense for export const useGridCallbackRef = (): [ref: GridImperativeAPI | null, setRef: (node: GridImperativeAPI) => void] => {
const ref = useRef<GridImperativeAPI | null>(null);
const setRef = useCallback((node: GridImperativeAPI) => {
if (node === null) {
return;
}
ref.current = node;
}, []);
return [
ref.current,
setRef,
]
};You'd then use it like this: const [xAxisMapRulerRef, setXAxisMapRulerRef] = useGridCallbackRef();Second, would it make sense for |
|
@jurerotar The problem is that the callback form of
As for this, they're currently required for two reasons:
|
|
Awesome, thank you very much! Looking forward to continuing testing v2 after the next alpha release! Thanks again for your work! |
|
Version [email protected] just published. Only known issues have to do with Grid RTL and minor scrollbar size alignment issues (both listed in the PR description). I'll try to publish [email protected] tomorrow or soon, but wanted to push out a few other fixes in the meantime. @jurerotar and @smoores-dev This should fix the memoization cycle you mentioned. |
|
Just published version 2.0.0-alpha.7 with RTL support for |

User facing changes
ListandGrid(aka no moreAutoSizer)@types/react-window)Pre-release testing via NPM
Known issues with latest alpha (
2.0.0-alpha.7)Gridmay not account for scrollbars spaces when scrolling in some cases