Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot remove all files & click done to save #329

Open
fabien opened this issue Mar 31, 2016 · 7 comments
Open

Cannot remove all files & click done to save #329

fabien opened this issue Mar 31, 2016 · 7 comments

Comments

@fabien
Copy link

fabien commented Mar 31, 2016

In the MultiWidget, it's possible to delete individual files. However, when deleting all of them, the 'Done' button will be disabled, and there's no way to save the wanted 'empty' state (in other words, leave the FileGroup/value empty). When closing the dialog using the (X) this is not persisted, and the state is reverted.

@dmitry-mukhin
Copy link
Member

interesting...

@homm
Copy link
Contributor

homm commented Mar 31, 2016

You are looking for cleareable option.
screen shot 2016-03-31 at 17 08 41

@homm homm closed this as completed Mar 31, 2016
@fabien
Copy link
Author

fabien commented Mar 31, 2016

Not really, because this will remove all items at once. You could use this option as a workaround, in order to clear the last remaining file, but it's counter-intuitive. Just try to delete files from a multi upload widget and you'll see what I mean.

@homm
Copy link
Contributor

homm commented Mar 31, 2016

Not really, because this will remove all items at once.

This is what you are looking for, isn't it?

@fabien
Copy link
Author

fabien commented Mar 31, 2016

Yes & no ;-) while editing the previously uploaded list (reordering etc.) you might decide to remove some files, perhaps even all of them. If you decided this upfront, then clearable would do exactly this, however, should you decide during arbitrary edits, it becomes a two-step process.

@homm
Copy link
Contributor

homm commented Mar 31, 2016

Well, I partly agree with you. The user may decide to save no files. But at the moment the dialog has very clear meaning: it can be "resolved with files" or "rejected" by the user. And widget always treats the dialog rejecting as "user does not change its choice".

So maybe we need to implement new state "dialog is resolved with no files", but this will be confusing for all API users and at least, should be done in next major version.

@fabien
Copy link
Author

fabien commented Mar 31, 2016

Sounds good, it's not really rejecting, and to make this clear, the 'done' button should remain enabled even if there are no files left. Perhaps you can introduce a config option for backwards-compatibility?

Could you re-open this issue, please?

@homm homm reopened this Mar 31, 2016
@Zmoki Zmoki added v4 and removed v4 labels May 4, 2018
@Zmoki Zmoki added this to the v4 milestone May 4, 2018
@Zmoki Zmoki removed this from the v4 milestone Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants