vue-bootstrap4-table icon indicating copy to clipboard operation
vue-bootstrap4-table copied to clipboard

Requesting a way to add an item

Open tettoffensive opened this issue 6 years ago • 7 comments

Hey, this is really useful, as I was otherwise going to build something like this from scratch.

I'm using it to make a CMS that interacts with a Firebase backend. I'd really like to be able to:

  1. Have a row where I can add an item directly inline.
  2. Be able to edit rows and click a button to update.

tettoffensive avatar Mar 19 '19 18:03 tettoffensive

Hi @tettoffensive

Thanks for the suggestion.

I've been thinking a similar feature like this, but till 3rd week of April, I will be busy with my thesis work. So can't start implementing a big feature like this before that. However, we can talk here about the idea and how the workflow will look like.

This is what I thought of,

  1. Have a separate actions column to edit or delete a specified row.
  2. If user clicks the edit button, a modal will pop up with necessary prefilled form. Now user can interact with the form to update the values. Once user clicks save button, table will emit an event with the updated data. So the user can now decide to store the data in the server or not and returns a new updated set of data to table again.
  3. For adding a new row, we can follow the step 2 again but this time without prefilled values.

To make this work, I guess we should ask a schema from the user for the row. What I mean is, we can have a schema to represent the row model. So, based on this schema I can render the form and prefil the values.

What do you think? If you've any better suggestions we can talk here.

Cheers, Ruby.

rubanraj54 avatar Mar 19 '19 20:03 rubanraj54

@rubanraj54 Your way would work. I had in mind something slightly different than a pop up modal. I was thinking more inline. Like the first or last row would have input fields that you could type into and click a button that says add or something.

I'm not sure which is better. Though I do tend to avoid modal pop ups. And I think there would need to be a good way to prevent people from creating duplicate entries based on uniqueId

tettoffensive avatar Mar 21 '19 16:03 tettoffensive

This is also a nice suggestion, I will look into it.

rubanraj54 avatar Mar 21 '19 17:03 rubanraj54

Inline edit or add actions would be very useful. Popup also can be good fit but there would be more complexity like form layout design would take long time more than inline option.

sdrig avatar Apr 03 '19 10:04 sdrig

Hi @sdrig , Good to see you again here.

Yes, you're right. It is easy to implement inline add item row than a popup.

I'll try to implement this feature in this month end.

Cheers, Ruby.

rubanraj54 avatar Apr 03 '19 19:04 rubanraj54

no update on this feature yet?

tebenk avatar Nov 24 '19 13:11 tebenk

Has anyone found a workaround to add inline editing to this project? Seems like this issue has been abandoned.

timsayshey avatar Jul 06 '20 15:07 timsayshey