Semantic React UI controlled components not working with React Final Form - semantic-ui

This question has also been raised on the react-final-form github issues list at https://github.com/final-form/react-final-form/issues/939
I'm using Semantic React UI 2.02 with react-final-form 6.5.3.
First Issue
I have a controlled Semantic React UI dropdown on a component that gets its value from the parent. If I put the Dropdown component directly into a React Final Form Field it works as expected. I can clear the currently selected value in the dropdown by updating the state value. But when I use a component you can see it ignores any change the parents tries to make to the state.
Not many examples out there to help guide me unfortunately.
Second Issue
Issue was "fixed" in 6.3.1 but still appears to exist.
#544
If I try to pass multiple to a custom component the value is ignored and always false.
Link to sandbox here https://codesandbox.io/s/semantic-react-ui-react-final-form-how-to-clear-dropdown-4l17f?file=/src/index.tsx
Third Issue
If you implement a wizard form and use a Semantic React UI dropdown on one of those forms. When you try to move back, the value selected on the dropdown is lost. Can't figure out a way to set it back again.
Would appreciate the wisdom of other users. Thanks in advance.

Related

How to get the selected values in a multiple select Dropdown component in the onClose event?

Have a look at this sandbox, the object doesn't seem to have the value defined onClose.
Forked codesandbox:
https://codesandbox.io/s/wqqyrv5xjl
I'm no expert, but I do have an app that is using a Semantic UI React dropdown with multiple selections just like you are. I don't rely on onClose, but instead keep track of selection state using onChange. Every time I get a change, I update state with the new selections. In my case I update my Redux state, but if you prefer, you can keep it in React component state.

Link jQuery-UI/Kendo-UI to make live changes to elements in page designer

I apologize if the title was not clear enough. I am working on a project where a user can design a page (something like Wix). I am continuing on a project left in-complete by some developer. The sequence of action is.
The user clicks on a link which adds an element on the page (e.g. textElement, picture, slider...)
There is an edit button for each element. Clicking which opens a dialog box.
On the dialog box there are sliders and color picker drawn using Kendo-UI. Using them the user can change the style settings for the element (e.g Font-Color, BG-Color, Font Size...)
What I want now is to apply/show the changes live on that element. I have the id available for each element. I can bind each of the style selectors and apply the changes live to the text element. But that does not seem the right choice as in future we might add another style selector in the dialog box, and that would mean adding the code for binding this new selector.
What I wanted to know was that is there an alternate or preferably easy way to do this?
Regards
Share some code with the basic idea that you follow, cause it's not getting clear what you did. It sounds like you can use the MVVM framework feature to help you for that.

Determine which (custom) component in a view currently has focus

I'm currently building a Flex 4.5 mobile project including several views and custom written MXML components that can be incorporated dynamically into those views.
How do I determine which component currently has focus, namely has been activated by the user tapping on it?
The background for this is a global search function in the main application. Depending on the results of this search, fields in the custom components are set. Given that I don't want all components in a view to listen to the outcome of that search function, I have to check which one is currently active.
I'm trying to bind the selected object (the result from the search function) to the active component.
Any help would be much appreciated.
Cheers!
You can determine which component currently has focusing using the FocusManager.getFocus(). Conceptually something like this:
var ComponentWithFocus : IFocusManagerComponent= FocusManager.getFocus();

Flex form inside Pop up window - Tab (order) between forms not working

when user clicks on Add button, then a pop up button will be opened with certain form elements (like textinput, date field, text area).. When i used 'TAB' inside this form,it is not working. I found in couple of Questions / forums that we need to create an instance of FocusManager and then bring/activate focus for the pop up. But still i didn't see the tab working inside the form. In order to tab order working inside a pop up, what steps we need to follow.
I tried using focusmanager and property like tabfocusenabled, tabenabled and also added taborder inside each form element. But no luck.
Iam using Flash Builder 4.5 and using spark components for development.
Is there any workaround for this problem?
Thanks in Advance,
Regards
Srinivasan
Thanks for all your responses.
Finally the issue has been solved by one of my colleague. Problem is , the form has been loaded inside Horizontal accordion (flexlib HACCORDION). So inorder to draw focus inside the accordion to child elements, we need to add 'hasFocusableChildren="true"' for the HAccordion (horizontal accordion component). Adding this property solves the tab order problem.
I have also pasted the code below:

Qt4, QToolbox: Keeping (some) child widgets enabled/accessible with toolbox being disabled

I'm currently building a data aquisition application, in which UI I placed the controls for mutually exclusive aquisition modes in the different subpages of a QToolbox, where the currently selected QToolbox item selects the aquisition mode parameter.
One desired feature is to lock the UI – after changing the parameters, the changes have to be applied/confirmed, being able to lock the UI elements against accidental changes is a feature, implemented by simply disabling the widgets. And since the aquisition mode is one parameter this also means locking down the QToolbox. However some controls within the toolbox need to stay unlocked since their effect is immediate.
So here's the question: In Qt4, how can I keep child widgets enabled and accessible while their container has been disables. Or how can I emulate the behaviour and look of such a setup?
Please don't suggest changes in the UI. I had all people in my research group testing different UI concepts and the current one is the one that ist most intuitive and straightforward to use.
If you disable the container, all its child widgets will be disabled. I don't think you can change this behaviour. So you have to disable separately all the child widgets that you don't want to remain enabled.
In the end I "solved" the problem by using a combination of QComboBox + QStackedWidget instead of a QToolBox and disable the combobox to lock it down.
You can lock the page of QToolbox using the UI function: setItemEnabled and pass the index of the page through the UI function: indexOf and your boolean.
Here's a little code:
ui->toolbox->setItemEnabled(ui->toolbox->indexOf(ui->page),false);

Resources