I need to make Drag and Drop list with angular material.
This is ok when I have one list, but now I need to have one multiple lists.
For example, I have one drag list with user roles (admin, user, view), and I need to have multiple users drop place, where I can drag&drop user roles. But, roles in DRAG list is always visible.
Here is an example of what I want, but I need help on how to make multiple drop list, depending on how many users I get from API and all this list need to get data from sam DRAG list, and also I need to have options to remove users role. Of course, on submit I need to send all this data to server
https://stackblitz.com/edit/angular-material-drag-copy-jervpt
EDIT:
with the help of #Campanita Belen I get to drag roles from one place to multiple drop zone.
But still don't find a solution on how to remove the added role, and how to collect data separately for every user tp JSON.
So it's actually very simple, in the drop event i'm pushing the item that just got removed from the list, also checking that i'm not adding it to the same list, leaving you the link with the code!
Hope this helps!!
https://stackblitz.com/edit/angular-f9kjw6
Also check the documentation of the drag & drop...
https://material.angular.io/cdk/drag-drop/api
Related
In my organization we need to configure work items to require the field callled parent, also I want to know if it´s possible send a warning for all the work items previously created to be fixed by the assigned people.
I expect when someone will try to create a work item would be necessary add a parent item to complete the creation and I hope update the previously work items quickly or in an automation way.
Due to certain limitations I am not able to index categories and subcategories so I need a way to be able to filter a list of manually created items. It's actually a two part thing:
1: I am filtering the visible results via a toggle switch
2: I now have a submenu (also manually created) with multiple items which need to be sortable as well.
So when I click on any item it filters. The behavior should be the same as in this demo.
This part, to be specific:
The issue I'm facing is that I don't know if this is possible at all. Yes, I looked at the obvious places but could not find anything helpful. Again, the list is created manually so I'd need some custom function to highjack the instantsearch results, I guess.
Any help is much appreciated.
I am a Django noob and have a situation that goes beyond the basic documentation, etc.
I am updating an ordering webpage that has a form structured as follows:
several text boxes, etc to gather general info (name, date, etc)
two separate tables for selecting (via checkbox) catalogs that are generated/managed using endless_pagination. Each table can have thousands of records, hence the endless_pagination. The first column in each table is a checkbox with value = catalog.id.
a textbox where the user can manually enter catalog IDs
a submit button
I am not sure how to keep track of what a user has selected in the two paginated tables since the checked boxes are lost when choosing a different page. Also, when the user flips back and forth between the pages, the previoulsy checked catalogs will need to be re-checked(since the checked state is not maintained). I am also not sure which tool(s) to use to deal with this.
My thought is to use JavaScript (with which I have minimal experience) to update a list of catalog IDs whenever a checkbox is checked/unchecked and:
- and attach that list to the form or
- update a variable in the form or
- send as a variable separate from the form, whichever is possible/makes more sense.
I'm hoping that maintaining a list of catalog IDs is possible because the next iteration of this form will likely include some sort of filtering so I'm trying to devise a solution that will not have to be reworked later.
I have reviewed a lot of posts but I believe the closest solutions are rendered useless because of the endless_pagination.
Let me know if further clarification is required. Thanks in advance for any suggestions.
UPDATE
I tried using JavaScript to store the catalog IDs in an array when a checkbox is checked. This does not work when a user selects another page in the pagination. The array of checked catalog IDs is lost when the page 'reloads'.
I'm running into this problem right now as well. I'm handling this by writing the checked items to localStorage so they carry across to page 2, 3, etc.. as well as show up as already checked when you go back to page 1. Then every time the page loads, either find and check the existing checkbox, or create a hidden input with the appropriate name and value and append it to the main form.
var selected_items = []
function add_item_to_checkbox(item) {
localStorage.setItem('selected_items', JSON.stringify(selected_items));
checkbox.on("click", add_item_to_checkbox);
bahh... Just look at my jsfiddle it's easier to read and yeah. I don't have to type JS into a textarea on stackoverflow.
Here is my javascript minus a few things that are specific to my code. I'm sure it could be improved upon but it works really well for my application.
I know this question has been asked many times i went through all of them but couldn't find the right solution hence writing my problem here may be again...
I want to create CMS for category-Products solution..i think the name itself is quite explanatory..
Every category can have n number of products in to it.
but i couldnt get how can i do this via umbraco.
i know, i can access child not via inline razor macro but how to access child node contents ...or may be some other right way!!
Please dont give me links to Run away modules..i have already visited them ...and could understand very little...
Any suggestion will be helpful.
Create (if you haven't already) two different document types; one called Category, the other called Product. (You'll also want to add the appropriate properties.) In the Structure tab of Category, be sure to allow Product (and don't forget to allow Category under whatever type it will live). From here, you should be able to create Category nodes, and then beneath each of them, Product nodes.
I am looking to create a settings menu feature that allows users to add, edit and remove items from a list. In adding an item to the list, the user will then be prompted to add some further sub-data such as name, value etc. The list should only allow one item to be selected. As far as I can see this is similar to, but beyond the capability of the PSMultiValueSpecifier, in terms of the user adds/edits/deletes and sub-data being added.
Similar functionality is implemented in the ‘Choose A Network’ section of the iPhone’s Wi-Fi settings but I am not sure how this is done. In this, users can add a new network and then specify security type, password etc.
Any ideas how I might go about achieving this?
Do a search in sample code regarding UITableView (In iPhone dev center or inside Documentation), I am sure I have seen that kind of sample ;)