I don't understand why there is not feature to simply remove elements from the widget. I can't set field empty, and only remove elements thru "Add items" process, but still it can't be empty.

I searched current issues and didn't find same issue.

Any problem here?

CommentFileSizeAuthor
#7 Selection_021.png37.05 KBsamvel
#4 Selection_014.png35.08 KBsamvel

Comments

Samvel created an issue. See original summary.

samvel’s picture

Issue summary: View changes
jsacksick’s picture

Category: Feature request » Support request
Status: Active » Fixed

All you have to do is just uncheck the checkbox, and the reference will be removed...

samvel’s picture

Status: Fixed » Needs work
StatusFileSize
new35.08 KB

@jsacksick Sorry, but seems it's not obvious and not simply.
I see few ways:
1) Append help text about removing, and may be message about that we have unsaved elements and should save form (as it done in node types or in views).
2) Append any button (or icon) to remove it (fast, by ajax)
3) Append button "Remove" items at the right of button "Add items" (in this case need to change some logic with checkboxes), and this button will remove selected rows.
4) Append button "Update" which remove unselected items:
4.1) With message that form should be saved
4.2) Save at the moment by ajax

jsacksick’s picture

Well, the only solution that'd make sense to me would be to add a remove icon for each table row in the widget, that is more or less solution #2: This would make sense but there's no need to implement ajax for that, removing the <tr> element in the DOM should do the trick...

Your screenshot doesn't show the latest version of the code, because unchecking checkboxes should cause items|rows to be removed.

samvel’s picture

If we choose solution #2, let's also append message, that entity should be saved, because it's not clear. It item removed after click - it's now looks like no needed other actions and item really removed

samvel’s picture

StatusFileSize
new37.05 KB

See screen. Message already exist when reordering, but it's missed when removing elements. It's bug

samvel’s picture

Assigned: Unassigned » samvel