Vue.js handling back button on crud navigation - vue.js

I have a search form that fills a table with the results of an API query. Each item on the table have an edit button. When the user click on that button, a view is showed, with the detail of the item. The problem is when I want to go back to the list, I lost the last search result. What is the best way to solve this problem?
I see two approaches: In first one, I save the results of the query through Vuex, but I dont know if Vuex is used to save large amount of data. On the second approach, I show/hide the components instead of change the route: when I want to edit an item, I hide the table and show the edit view. When I want to go back to the list, I hide the edit view and show the table. Is there another way to solve this problem?
Thanks in advance.

Related

How Do I Expand A Cell in MUI-Datatables to display additional content?

I want a user to be able to click a row in the MUI-Datatable, so they can see additional content. The current renderExpandableRow function has the right styling, but I don't want a new row. I want the cell in the first column to show additional data. Is there a way to do this?
Note: I'm also going to need buttons that will expand all/collapse all, so I need a solution flexible enough to do that.
I found a solution to my question.
I made the first column's content a Button using customBodyRender. The column with expandable content became the second column. This column has a customBodyRender with a Collapse component. I store in my component's state all ids of my data objects and whether or not they are expanded. When the Button is clicked, my component's state is updated, which in turn changes whether or not the Collapse component is open.
I also used customToolbar in the table options to generate an expand all/collapse all button, which just sets the state of all rows to expanded/collapsed.

Show only parts of table vue.js

I want to create dynamic table with vue.
I have button and table with 3 columns.
I want that if i click on the button only the first and second colume will show and on addition click only the first and the third.
So my question is what better is to do:
A. to hide one colume on click
B.to create customized table in the vue.js code by click
without knowing any specifics, I'd go with easiest way, which for me would be to do two things. Use button to toggle value ie. #click="showCol=!showCol" and the for the columns I'd do <td v-if="showCol">{{col2data}}</td><td v-else>{{col3data}}</td> you can also do <td>{{showCol?col2data:col3data}}</td> And I'm sure there are some other ways too, but I'd try one of those. The former should use a shadow dom to replace the data, whereas the second option would not, so I'd imagine that if you have enough rows where that would matter, the second version may be faster. As always, test & measure if you want to know what's better.

MVC PartialView page rendering dropdown value and checkboxes

I am working on an mvc page, it has 2 partial views and one controller action. In one of the partial views i have a button, this button checks if the user entry exists in the database. in the other partial view i have a drop down and a table, the table is populated based on the dropdown selection.
My issue is, everytime I select some values in the table( all are check boxes) then enter some values for "Verify" button the form refreshes and clears out all selected checkboxes. is there a way to fix this?
P.S.:
I am using Viewbag to bind to dropdown selection and onchange event for dropdown.
Please guide me in fixing this. this is driving me insane.
Thank you.
If I undestand you as correctly, You can use javascript I think :). Also If you dont want to load all page, you can look ajax post with partial View in MVC
This may help your problem :D

Edit data by Pentaho dashboard

Is it possible to edit data in database by Pentaho dashboards?
I want to do dashboard where data will be presented in table with edit buttons. When button will be pressed, the form will appear in modal window filled by data. User will change and press ok, and this changes affects to database.
I haven't found anything related, all I found was just present data, not change.
thanks
Yes. Take a look at the table editor sparkl plugin

How to bind data in controls and edit accordinly on dropdwonlist selectedindexchagned event in mvc4 razor using jquery?

I have a view for create/ edit data, in my view contains a dropdownlist control and two textboxes and two buttons [Create, Done Modifications], and my requirement is like below.
User should be able to select his/her name from dropdownlist which contains list user names. By default create button is visible and ‘Done Modifications’ button should be invisible.
Based on the dropdownlist item selection, if the record is already exists then show up his/ her data in DOB, Location textboxes then invisible Create button and able to update to the database by Done Modifications button.
Data population, edit, create, delete logic should be implement in Controller classes.
Above things should be happen in asynchronously, I don’t want to allow post backs on any events.
Thanks for your time!
Sridhar Goshika
What is the hourly rate you are going to pay for this?
This is a list of specifications given to you, that you pass on to us; It does not show any research, any code showing what you have done and where you are at. Moreover, there is no question there.
submit() method will submit the form by dropdownlist item selection
#Html.DropDownList("ProdID", null, new {#onchange="submit()" })