How to add a additional menu beside a select option? (react) - html

I found a greate select lib for react (react-select), but it not supported for nested select options, so I want to know how to add an additional menu beside a select option? it's kind of like the bookmark collection.
here I have a demo :
enter link description here

I have found a solution , antd - cascader menu. it 100% matched my reuirment.
here is the link : https://ant.design/components/cascader/

You can use react-metismenu, this library is for infinite nested options.

Related

How to add images to a select option in reactjs formik

I trying to add an image to select option in reactjs
I tried to put it in an img tag but it showed in the page as [object object]
I had the same problem. I'm assuming you are using Material-UI.
Use menu item instead of a select field.
https://stackworx.github.io/formik-material-ui/docs/api/material-ui
import MenuItem from '#material-ui/core/MenuItem'

Bootstrap ListBox with post option

I want to display two listboxes like in C# to add or remove items.
Is there a option in twitter bootstrap?
I tried out the
<div class="list-group"></div>
But there is no option to post this data to the next page without a js function.
Maybe bootstrap duallistbox plugin -> http://www.virtuosoft.eu/code/bootstrap-duallistbox/ will suit your needs?

Modify sub nav output using a filter in Wordpress

I want to add html after the contents(sub-nav toggle button) in the li in my wordpress nav if the item has children...
I've tried using nav_menu_link_attributes and wp_nav_menu_args but can't seem to have either do what I want, because I need to check the class and modify the args.
After not receiving a response I just used jquery to select the elements and append. Not quite the best solution, but works fine. Here is the line of code:
$('#site-nav .menu-item-has-children').append('<div class="sub-menu-toggle" id="sub-menu-toggle">Menu</div>');

creating a hyperlink from a form select value

I would like to make a simple drop down menu when you click your choice from the list, it acts as a link.
Sorry for title being so ambiguous, I just do not have any idea what to call this.
The easiest way is to create a select list with attributes representing the links, then use JavaScript to jump to a link when it's clicked.
But a more accessible way would be to create a list of links, then use JavaScript to construct a select list from them. This way, the links would still work if JavaScript was turned off.
With jQuery, something like:
Link 1
Link 2
And your script is:
var $sel = $("<select/>")
.appendTo("body")
.change(function() {
document.location.href = $sel.val();
})
$("a").each(function() {
$("<option/>")
.appendTo($sel)
.val(this.href)
.html(this.innerHTML)
});
Do you mean that when you select an option from a drop-down, the browser goes to a different URL?
If so, here's a good page that describes how to accomplish that: http://www.davesite.com/webstation/js/theory1jump.shtml

Sencha show / hide element

I have a simple form, and I work with a button that has a handler to get the submit. When the user clicks that button, I want to show a 'DIV'-element.
How is it possible to show / hide a specific element in Sencha?
Thanks in advance!
To show a component:
Ext.getCmp('YourDivID').show();
To hide a component:
Ext.getCmp('YourDivID').hide();
Before this, you have to of course create a component with YourDivID.
You have to use getCmp in order to select an element,
but you have to use Ext.select() in order to select an HTML element like divs.
Example usage:
Ext.select("#yourdiv").hide();