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

TypeScript bindings #209

Closed
statico opened this issue Feb 26, 2019 · 5 comments · Fixed by #223
Closed

TypeScript bindings #209

statico opened this issue Feb 26, 2019 · 5 comments · Fixed by #223

Comments

@statico
Copy link

statico commented Feb 26, 2019

This is a great library. However, it would be even better if it included TypeScript bindings, or at least third-party bindings via https://github.com/DefinitelyTyped/DefinitelyTyped .

For now I've created a types/react-dropdown-tree-select.d.ts file which contains the following:

declare module 'react-dropdown-tree-select' {
  export default class DropdownTreeSelect extends React.Component<any, any> {}
}
@mrchief
Copy link
Collaborator

mrchief commented Feb 26, 2019

I've thought about this and IMO (and I think you'd agree) that having React.Component<any, any> {} is as good as not having any typing. It's a good first step though.

I'd be open for a PR on this if someone wants to do it with the proper types.

@mrchief
Copy link
Collaborator

mrchief commented Feb 27, 2019

@allcontributors[bot] please add @statico for ideas

@allcontributors
Copy link
Contributor

@mrchief

I've put up a pull request to add @statico! 🎉

mrchief pushed a commit that referenced this issue Feb 27, 2019
Adds @statico as a contributor for ideas.

This was requested by mrchief [in this comment](#209 (comment))
ellinge added a commit to ellinge/react-dropdown-tree-select that referenced this issue Mar 21, 2019
ellinge added a commit to ellinge/react-dropdown-tree-select that referenced this issue Mar 21, 2019
ellinge pushed a commit to ellinge/react-dropdown-tree-select that referenced this issue Mar 21, 2019
ellinge pushed a commit to ellinge/react-dropdown-tree-select that referenced this issue Mar 21, 2019
mrchief pushed a commit that referenced this issue Mar 28, 2019
Adds @statico as a contributor for ideas.

This was requested by mrchief [in this comment](#209 (comment))
ellinge added a commit to ellinge/react-dropdown-tree-select that referenced this issue Mar 28, 2019
mrchief pushed a commit that referenced this issue Mar 31, 2019
Adds TypeScript-definitions

I also noticed that onAction is not correctly implemented. Currently sends a { action: string, id: string }.
There is code in index.js which tries to fetch the node. But it does not seem be working. It expects two parameters but receives the object described above in the first parameter.
![bild](https://user-images.githubusercontent.com/17863113/54728331-8d972980-4b7d-11e9-9490-a3bd6b08481f.png)

Changed the examples/stories to get the node id at least.
Also changed in readme where onAction should be applied.

Fixes #209 

- [X] New feature
mrchief pushed a commit that referenced this issue Apr 18, 2019
Adds TypeScript-definitions

I also noticed that onAction is not correctly implemented. Currently sends a { action: string, id: string }.
There is code in index.js which tries to fetch the node. But it does not seem be working. It expects two parameters but receives the object described above in the first parameter.
![bild](https://user-images.githubusercontent.com/17863113/54728331-8d972980-4b7d-11e9-9490-a3bd6b08481f.png)

Changed the examples/stories to get the node id at least.
Also changed in readme where onAction should be applied.

Fixes #209 

- [X] New feature
@mrchief
Copy link
Collaborator

mrchief commented Apr 18, 2019

🎉 This issue has been resolved in version 1.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mrchief
Copy link
Collaborator

mrchief commented Jun 10, 2019

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants