Redux form not updated for new material-ui i.e. "#material-ui/core": "^3.3.2" - redux-form

"material-ui/core": "^3.3.2" is very different compared to "material-us": "^0.19.2". The examples in redux forms are not working for material-ui.

Someone updated this just as you were posting about it. PRs always welcome.

Related

_subject hidden input not working formsubmit.co in React form

I am trying to use FormSubmit to submit a basic form from my React app to my gmail account. When I use the _subject hidden input from their documentation it works in their live demo but not in my code. Any suggestions??? And yes, I am using styled components so the form is not all HTML, but the form works as is, but the subject line always the same right now...
I have tried hard coding a subject instead of using my state variable, taking out my subject input and only having hidden _subject with hard coded value, I have tried using and fields, and I have tried making the input a styled component like the rest of my inputs
https://stackoverflow.com/a/42161567/20616453
I found this thread and it solved my question if anyone else has the same problem...putting the _subject in the response body fixes it!!!

How to enable v-model on custom component?

I'm trying to wrap a TexField ui to a new custom component so that I can add extra functionalities and reuse the component within the project. I want it to still have the v-model binding so I implemented the following:
:text="text"
and
#textChange="(update)=>{$emit('textChange', update.value)}"
Wherein "text" is its prop named and exposed exactly as a normal TextField prop.
The pattern should work on web but I don't know if it's possible on nativescript vue component. Please have a look at the code I made in playground: https://play.nativescript.org/?template=play-vue&id=Ikap1R&v=1
It's not working. Please help if you know the solution.
Thanks
There is nothing you have to do specifically for {N}, if you know how it works with Vue.js, you got it.
All you have to do is, use a value prop for input value and emit input event on change.
Updated Playground

Redux-form field with input component re-renders on first character causing the keyboard to collapse

I have a form which is made using some logic, loading components from an external API.
This was working great using redux-form 6.3.2 and react 16.0.0-alpha.12.
The app is built with expo and I had to update expo SDK to the latest, which updates react to 16.3.1 and forced me to update redux-form. Since I had to update I went to the latest version (7.3.0) which led to some issues in the app that I was able to fix, but for this one I can't find a solution:
The forms is created using fieldArray and Field, so the createElement, after some processing does this:
return fieldObj.fields ?
(<View key={idx} style={style}>
<FieldArray {...fieldObj}
key={idx}
name={fieldObj.name}
component={component} />
</View>)
:
(<Field {...fieldObj}
key={idx}
style={style}
type={fieldObj.type}
name={fieldObj.name}
component={component} />);
And we get component using a formWrapperHOC:
formLib.FormWrapperHOC(formElement, {
onChangeCB,
onBlurCB,
stylesKeys,
formName,
extraProps,
})
which in turn does some things until it renders:
//FormWrapperHOC render method:
render() { return (<WrappedComponent {...this._massageProps()} />); }
So when I insert the first character in this input I see the events:
##redux-form/FOCUS
##redux-form/CHANGE
##redux-form/UPDATE_SYNC_ERRORS
##redux-form/REGISTER_FIELD
##redux-form/UNREGISTER_FIELD
I tried removing validations, so UPDATE_SYNC_ERRORS is not called, but item still rerenders.
Another thing that caught my eye is that the field is registered and later unregistered.
I end up with the input field and the character I entered, but keyboard is collapsed. If I focus on the field again everything works as expected: No call to UPDATE_SYNC_ERRORS because the field already has some content on, only CHANGE is triggered.
Since this works fine with redux-form 6.3.2, I'm pretty sure I need to make a change in my code for it to work with redux-form 7.3.0. Thing is, I was not able to find where is the issue, so any help or lead for where to look will be greatly appreciated.

jQuery Masonry and UI Sortable

There's this website I'm developing which can be found here. It's a photography website and my client asked for me to implement something that would allow her to move the photos around and change the order of which they appear. They come from a MySQL database and are displayed with jQuery Masonry.
I thought instantly of jQuery UI Sortable, and I've been trying to implement it with absolutely no luck at all.
How can I achieve this? Can someone point me in the right direction, please?
Thanks in advance!
I am struggling with the same issue, so far my answer has been to change classes with jquery's sortable start, stop, change and sort events. Like so:
$('#sortable').sortable({
start: function(event, ui) {
console.log(ui);
ui.item.removeClass('masonry');
ui.item.parent().masonry('reloadItems')
},
change: function(event, ui) {
ui.item.parent().masonry('reloadItems');
},
stop: function(event, ui) {
ui.item.addClass('masonry');
ui.item.parent().masonry('reloadItems');
});
Here is a working example and a JS Fiddle on the subject. It's a start.
However, this is not a 'presto' solution, this examples work with older versions of masonry, the latest version has a few bugs implementing it since the "reload" method was replaced with layout() and reloadItems().
Or... you can use the old masonry versions, if it works for you.
Alternatively you can use jQuery.Shapeshift(), which does basically what you're looking for.

Wicket RadioGroup, AjaxFormChoiceComponentUpdatingBehavior, Form Submit?

I got a RadioGroup in Wicket with an AjaxFormChoiceComponentUpdatingBehavior added.
Upon triggering the change, the behavior is sending a POST, but other changes on the parent form are not sumbitted.
My question is: What is the correct way to achieve a complete submit?
(I need the complete form submit because there's other stuff going on with the form)
I do not think that there is a standard wicket way to do this.
Would "pressing" an AjaxSubmitButton using JavaScript work for you?
Maybe someting like this?
onchange="$('button.mysubmit').click();"
(assuming that you have an AjaxSubmitButton with the CSS class mysubmit)

Resources