AutocompleteArrayInput isn't working in 2.4.0 - react-admin

I am using React-Admin, and I use the : <AutocompleteArrayInput />.
This morning, I updated my React-Admin to the 2.4.0 version; and my component isn't working anymore. Nothing changed about this component in the documentation.
Here is my code :
<ReferenceArrayInput source="myJson['myKey']" reference="myTable" alwaysOn>
<AutocompleteArrayInput optionText="id"/>
</ReferenceArrayInput>
And I get this error :
TypeError: selectedIds.forEach is not a function
If you see something suspicious in my code please, explain me.

It's a bug. For a temporary fix, add defaultValue={[]} to your ReferenceArrayInput

Related

Alternatives to react-native-date-picker?

I am trying to use the react-native-date-picker on my vanilla react native project (no expo). I followed all of the installation instructions, but any time I attempt to render the DatePicker I get the following error...
[Invariant Violation: requireNativeComponent: "RNDatePicker" was not found in the UIManager.]
Now, when I check the documentation, I can see that it looks like I need to declare <RNDateTimePicker mode="date" /> somewhere, but the documentation is so piss poor, I have no idea where to put it in the file or in relation to the date picker object. The documentation through and through is petulantly unhelpful, to say it positively. Does anyone know how to fix this issue, where to put that magic line, or have any idea what DatePickers aren't inherently broken with the documentation skills of a 2nd grader?

Upgraded to React Native 0.62.0 Getting Warning Sign - "Calling `getNode()` on the ref of Animated component is no longer necessary

I just upgrade my react native app to 0.62.0, and now my app keeps getting this warning sign
ReactNativeFiberHostComponent: Calling `getNode()` on the ref of an Animated component
is no longer necessary. You can now directly use the ref instead.
This method will be removed in a future release.
I'm not sure why this issue is showing up? Can someone please explain?
I also see Stack
ref.getNode |
createAnimatedComponent.js:129:20
SafeView#_updateMeasurements | index.js:192:14
SafeView#componentDidUpdate | index.js:154:9
Update
I believe this might be coming from SafeAreaView from react-navigation
I also came to this warning after upgraded ro RN 0.62.1, and I didn't use getNode() at all, turns out it came from a depedencies that I use, called react-native-snap-carousel because they build it with FlatList and possibly using the getNode() as well.
And now there's an open issue about this in their GitHub repo that we can follow, here's the link to the issue
Update
this also came from package react-native-safe-area-view, possibly your app is using this package and now they have released new version to fix getNode() deprecation, see this PR
so instead of fixing the file directly yourself, you just need to update the package, simply run: npm i react-native-safe-area-view
Hope that's help :)
To quick fix this go to node_modules/react-native-safe-area-view => index.js
at line 192 change
this.view.getNode().measureInWindow((winX, winY, winWidth, winHeight)
to
this.view.measureInWindow((winX, winY, winWidth, winHeight)
If you are using react-native-snap-carousel you can fix it by modifying your node module locally.
first go to
./node_modules/react-native-snap-carousel/src/Carousel.js
change
const AnimatedFlatList = FlatList ? Animated.createAnimatedComponent(FlatList) : null;
const AnimatedScrollView = Animated.Animated.createAnimatedComponent(ScrollView);
into
const AnimatedFlatList = FlatList ? Animated.FlatList : null;
const AnimatedScrollView = Animated.ScrollView;
and finally, change your _getWrappedRef function to
_getWrappedRef () {
return this._carouselRef
}
This will stop the warning until we have an update on that package.
As seen in the blog post announcing the release of RN62, getNode() is now deprecated. You can just use ref without calling getNode(). See this commit.
the issue will happen when you use createAnimatedComponent for components while its already exist in animated library for example if we use it to FlatList this warning will be showing
for fix it just call componenty directly
for more detail enter link description here
change
return this._carouselRef && this._carouselRef.getNode && this._carouselRef.getNode();
to
return this._carouselRef;
*Removing getNode() will fix it.
i find that error in my project.
Fix: copy "getNode()" and find all in your project, delete it.
Delete warning getNode()

How to fix typing error Shapes and Connectors with SymbolPalette in VueJS

I try to duplicate the creation of Symbol Palette on my component, but I got errors on the types :
let connectorSymbols: ConnectorModel[] = [...]
or
let palettes : any
I have syntax error, I am a beginner on VueJS and I never encountered this kind of declaration.
Could you help me ?
I use a boilerplate vue and webpack, is that enough ?
The following details are needed,
We need more information about your exact requirement and if possible provide issue reproducible sample?
Did you follow all the steps in the getting-started documentation to create Vue ColorPicker sample using Webpack?
We have created simple Vue ColorPicker sample using webpack and it can be download from here.

Vue-Material navbar, Missing required prop: "to"

So the Vue-Material docs (https://vuematerial.io/components/bottom-bar) says it is possible to create a md-bottom-bar stuffed with md-bottom-bar-item, while being able to make md-bottom-bar-item act like a <router-link>
Their code can be seen right below "Seamless integration with Vue Router" (this is exactly what it's meant for by the way ^^), and my code looks like this :
<md-bottom-bar-item
id="messageRoute"
to="/Messages"
#click="stuff"
md-label="Notifications"
md-icon="message">
</md-bottom-bar-item>
<md-bottom-bar-item
id="settingsRoute"
to="/Settings"
#click="stuff"
md-label="Options"
md-icon="settings">
</md-bottom-bar-item>
These are tabs to a notifications list, and the settings page for my app.
The error I got when I click on an item is literally this (I got it 5 times though, beucause there's 5 items in my navbar) :
[Vue warn]: Missing required prop: "to"
found in
---> <MdButton> at src/components/MdButton/MdButton.vue
<MdBottomBarItem> at src/components/MdBottomBar/MdBottomBarItem.vue
<MdRipple> at src/components/MdRipple/MdRipple.vue
<MdBottomBar> at src/components/MdBottomBar/MdBottomBar.vue
<NavBar> at src\components\NavBar.vue
<App> at src\App.vue
<Root>
I got the same error without the #click='stuff' by the way, nothing to do with it.... I guess...
Is it about Vue-Material#1.0.0 (the one I'm using) being in beta or ? It feels like I'm doing what is showed in the doc, I even copy-pasted it and changed things so it would fit in my app.
For now I just did a goTo(path) methods, that just do this.$router.replace(path), but the bottom bar is not sync with Vue's router, with the md-sync-route attribute, like so :
<md-bottom-bar md-sync-route>
<!-- stuff -->
</md-bottom-bar>
Not a critical problem, but damn, why Vue.js, why ??? ^^'
And, what a troll :
Ok, this is interesting.
As the issue you gave me pointed out, this might be a version problem, but my vue version is 2.9.2 (checked it with vue -V). Nevermind, I still ran npm update -g vue, and the answer I got from the terminal... well :
+ vue#2.5.11
updated 1 package in 0.626s
Now everything works fine (router, to, etc...).
But why though ? Does vue-material uses a slightly different vue, or there's some parts that are redefined, like router link's behavior on certain element like md-bottom-bar-item ?
And why npm install couldn't fix that ? Well anyway, now it works, and my last questions exists probably because this framework is a beta and few things have to be done... or because I'm starting to do stuff with npm etc ^^
If you know something it would be helpful for me to know, feel free to tell me, I'd be glad to hear...
It will also happen in 1.0.0-beta-8, but there seems to be a commit to fix
https://github.com/vuematerial/vue-material/commit/6860d3a004b09baef751724c0d9bf1ebdf92b752

Extjs 3.2 : Js error in built function "onDocumentReady"

I`m getting js error, after loading below function,
Ext.onReady(function(){
aFunc123([{header:'ss',Fn:'aFunc1(1)'}],"",undefined,{showCheck:true})
})
After coming out of "aFunc123" function,extjs immediatly calls "onDocumentReady" function, problem is, passed arguments are undefined,and also I dont know how it`s getting called.Please check out, for this problem I`m getting error like `"Unable to get property 'apply' of undefined or null reference"`.
Please suggest me what wrong I`m doing here.
I`m using ExtJS 3.2,IE10.
Thanks in advance.
Ext 3.4.1a was released recently to add IE10 support. You can download it from the Ext website. Otherwise, older versions don't have support for IE10.