Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How can I limit resizer translateX position with deltaOffset if a column has maxSize? #6104

Unanswered
voidtask asked this question in Q&A
Discussion options

Is there a way to prevent resizer from going beyond the column's size limit if I'm using onEnd? I tried to limit deltaOffset but I couldn't find a way to understand what kind of column size I would end up with after the resize is applied. My idea was to use something like min(deltaOffset, maxSize - currentSize), but I could not find an API to access column's max size, am I missing something?

That's what I'm talking about, I'm trying to prevent resizer from being moved too far from max size

<div
 @dblclick="() => header.column.resetSize()"
 @mousedown="(e) => header.getResizeHandler()(e)"
 @touchstart="(e) => header.getResizeHandler()(e)"
 :style="{
 position: 'absolute',
 right: 0,
 top: 0,
 bottom: 0,
 zIndex: 10,
 width: '6px',
 height: '100%',
 backgroundColor: 'red',
 transform: header.column.getIsResizing() ? `translateX(${table.getState().columnSizingInfo.deltaOffset}px)` : '',
 }"
 ></div>
						```
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /