Skip to content
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

Remove async keyword, avoid iooxa undefined issue #2

Merged
merged 3 commits into from
Feb 15, 2021
Merged

Remove async keyword, avoid iooxa undefined issue #2

merged 3 commits into from
Feb 15, 2021

Conversation

lrq3000
Copy link
Contributor

@lrq3000 lrq3000 commented Jan 1, 2021

Awesome work @rowanc1 ! Sorry I couldn't come back to your project before, but now I'm starting again with the new iooxa package you've made :-)

I love the changes so far! I am now trying to do more complex stuff (I also learnt a bit of modern javascript since then :-) ), so here are a few suggestions to improve the doc IMHO:

  • Remove the async keyword in the intro to avoid this issue when trying to access iooxa from a custom javascript function. It may be obvious for more experienced JS developers but for me it wasn't :-/ So I'd suggest it's better show an intro example that doesn't risk the user running into this issue. This is what this PR does.

  • Add the examples you wrote here in the doc, in a new section "custom javascript functions"? Right now the doc only includes a section for "Runtime" which is great to build new components, but it doesn't explain how to access programmatically already existing components through iooxa.

  • How to call custom javascript functions, as previously discussed here (although it seems these examples do not work anymore or at least not on all input types, as the :change attribute cannot call JS functions on r-select for example, didn't yet try others).

@rowanc1
Copy link
Member

rowanc1 commented Jan 1, 2021

That is a great idea to remove the async keyword. Thanks for the suggestion. :)

I will take another look through your other comments before merging this in.

@lrq3000
Copy link
Contributor Author

lrq3000 commented Jan 4, 2021

Thank you so much @rowanc1 ! iooxa's expressivity is astonishing!

BTW I found how to do the last point, how to call custom javascript functions from a r-select, using the onclick method instead of onchange or :change (onchange should work as it does with standard html select, but for some reason this event doesn't work properly on r-select). An example:

<r-select bind="myvar" values="A,B,C,D" onclick="myCustomJSCallback()"></r-select>

@rowanc1 rowanc1 merged commit cf4eabd into curvenote:master Feb 15, 2021
@rowanc1 rowanc1 mentioned this pull request Feb 15, 2021
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