Skip to content

Options and events #28

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

Merged
merged 1 commit into from
Oct 24, 2019
Merged

Options and events #28

merged 1 commit into from
Oct 24, 2019

Conversation

ancapdev
Copy link

Very useful package.

I was interested in exposing more of the options and events to the caller, and knocked up this code.

I tried putting together something that was more generic, but couldn't find a good way to map event properties. Ended up hard mapping the two I was interested in, and exposing only a subset of the available events. Be very happy to see a better solution to this.

Left onCellValueChanged in there to not break any API, but might be good to move forward with a scheme for mapping the underlying JS API in a more consistent fashion.

These events are accessible to the caller through the observables of the returned Scope object.

@pfitzseb
Copy link
Member

pfitzseb commented Jul 2, 2019

Good idea. Honestly, I think we can just deprecate the old API and switch to this, since it seems much cleaner to not have both ways. You wanna take a stab at the deprecation?

@ancapdev
Copy link
Author

ancapdev commented Jul 2, 2019

Sure. What do you have in mind for that? Maybe something like

  • remove cell_changed
  • bind onCellValueChanged using the new mechanism
  • marshal newValue and oldValue when present
  • add API to decide which columns are editable

Or do you want the old API available with a warning?

@pfitzseb pfitzseb closed this Sep 16, 2019
@pfitzseb pfitzseb reopened this Sep 16, 2019
@pfitzseb
Copy link
Member

Sorry for getting back to you so late, but that sounds like a solid plan. If you're still up for it then I'd love to have that in this PR, otherwise I'll merge this fairly soon and unify the API in a follow up PR.

@ancapdev
Copy link
Author

Forgot to check on this for a while. Perhaps best to merge and get these in, then follow up with more changes to revamp the API.

@pfitzseb pfitzseb merged commit a9e7ea4 into JuliaComputing:master Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants