-
Notifications
You must be signed in to change notification settings - Fork 2
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
Detecting col-resize event #19
Comments
Dupe of #12? |
Yep dupe. I’ll get on that you’ll def need it :)
…On Thu, Jan 25, 2018 at 3:17 PM Alex ***@***.***> wrote:
Dupe of #12 <#12>?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABE5mNucrghDee8nMR70gZwieIZrlpPZks5tOQuPgaJpZM4Rtowf>
.
|
Thanks man. I figured out that we can do this to get the new width of the column we just resized: |
Yes totally can do that. The props would just be a convenience. Nice job
finding the space converters btw! I think you may want grid.data.col though
because the moves column index is in the data space. Meaning the indexes
starting at cell 0 excluding the headers
…On Thu, Jan 25, 2018 at 4:43 PM Yash Shah ***@***.***> wrote:
Thanks man.
I figured out that we can do this to get the new width of the column we
just resized:
this.grid.eventLoop.bind('grid-drag-end', (e) => { const col = e.col const
newWidth = this.grid.view.col.get(col).width });
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABE5mN7N4VM3_VRVB2WIhkrSTpnjr4z0ks5tOR_AgaJpZM4Rtowf>
.
|
For sure, having the props will definitely be easier. But just until that is implemented, this will help us move along. |
I am noticing this weird behavior::
Is it lagging or is it because my function runs and then your function runs which is where the width gets updated? |
Fixed the above issue by adding a delay |
Interesting.. would you mind posting your code?
…On Fri, Jan 26, 2018 at 12:32 PM Yash Shah ***@***.***> wrote:
Fixed the above issue by adding a delay
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABE5mAVepF9yk-57C6rPzYP4bRG0OCaPks5tOjZDgaJpZM4Rtowf>
.
|
|
Yeah... let's not do that. This will cause all sorts of timing-related bugs. |
Yeah, we realized that, its a hacky solutions until we can pass grid event props |
oh dude. instead of and again i mentioned this on another issue but not sure if you caught it. you want to be using |
oh and better yet. you can get the column directly off the event like so |
also please make suggestions about naming and things you're finding confusing. i would love to improve the usability of the grid's apis and since v4 is in beta we have a good opportunity to rename or move things. |
Is there a way to listen for a col-resize callback event and then the grid calls a callback with the column index, or something else.
Something like
<ReactGrid onColResize={this.handleResizeColumns} />
The text was updated successfully, but these errors were encountered: