undefinedfix
Sign in

The problem of page flipping and echoing of dropdown box data in element UI table

Subramanian edited in Sun, 11 Sep 2022

In the project, use the table component in element UI. The row in the table contains the drop-down box to select events. Page turning is requested from the background. Now I can record the check status of a row after page turning, but how can the selected value of the drop-down box in a row be displayed

For example, the instructor in the table is automatically filled in after the selection of teaching class is completed. Now I turn the page and return to the previous page. The values selected in the previous drop-down box have disappeared, and only the check status is still there, as shown in the figure:

How can I remember the value selected before the drop-down box in the table? Thank you very much

1 Replies
pazhitnov
commented on Sun, 11 Sep 2022

When you turn the page, you request from the background again. All the requests are the data saved in the database. You can choose to save them later. Why do you want to record them in the front end? After a refresh, they are all gone. Or if you have to do so, you can record the status of this item. Then you can write it to an object{ check:1 ,value:""}