appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.89k stars 466 forks source link

beforeSend not in versions past 2.8.2 #568

Closed csepulv closed 5 years ago

csepulv commented 5 years ago

The beforeSend prop, on ReactiveBase, is still present, but it is missing from appbase-js in the 4.0 beta that is now in `package.json'.

Do you know is beforeSend will be supported past 2.8.2, i.e. in future versions of `appbase-js'?

Thanks

metagrover commented 5 years ago

Thanks for bringing this up. We renamed it to transformRequest in appase-js. We will update the docs and change the prop name here as well.

Expect this to roll out in the next release.

csepulv commented 5 years ago

thanks. Should I close it out or do you prefer to wait till next release?

metagrover commented 5 years ago

Let's keep this open so that we can track the progress here 🐱

csepulv commented 5 years ago

I think there is a bug in the rename/cleanup. The older version of AppbaseClient would set `beforeSend' in its constructor. https://github.com/appbaseio/appbase-js/blob/83ae5186cda742ff1a1aed4405e39e9dc3780af7/src/index.js#L42

But in the current version, transformRequest is not being set from the constructor args in `AppBase'

https://github.com/appbaseio/appbase-js/blob/c81cc3574f41ed918983d060679c6d750345a5fa/src/core/index.js#L13

So tranformRequest is always undefined in https://github.com/appbaseio/appbase-js/blob/c81cc3574f41ed918983d060679c6d750345a5fa/src/core/request/fetch.js#L57

I can create a new issue for this. Or I can create a pull request. (I think it is a 1-line fix). If you prefer I submit a pull request, which branch should I fork? develop?

siddharthlatest commented 5 years ago

@csepulv Yes, you can fork the develop branch for appbase-js.

metagrover commented 5 years ago

We intend to keep the appbase-js usage as it is now. Need to make necessary fixes in reactivesearch to use the new syntax.