ngf-keep="distinct" removes all files from the model before adding new files - is this how it should work?
See original GitHub issueIf I have
<button type="button" ngf-select ng-model="uploadFiles" name="uploadFiles"
ngf-multiple="true"
ngf-keep="distinct"
>Add files</button>
my intuitive expectation would be that each time I click the button and select files, the new files should be added to $scope.uploadFiles
and the old ones should still remain in the model. Only if I select the same file twice, it will be ignored in the model. But currently, each time I click the button my $scope.uploadFiles
gets completely cleared out.
If I set ngf-keep="true"
then $scope.uploadFiles
is not cleared out, but then, obviously, duplicate files are not filtered either.
Is there any way to make distinct
work similar to true
and ignore only duplicate files without clearing out all the other ones from $scope.uploadFiles
?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Replace instead of delete and add file with ngFileUpload
How can new files simply replace old ones without deleting the old one on click? Another option would be to use the ngf-before-model-change ......
Read more >git-rm Documentation - Git
Remove files matching pathspec from the index, or from the working tree and the index. git rm will not remove a file from...
Read more >Unstage - GitLab Docs
Unstage. all tiers. To remove files from stage use reset HEAD where HEAD is the last commit of the current branch. This unstages...
Read more >Manage files under version control - PyCharm - JetBrains
Put any files in the Unversioned Files changelist under version control by pressing Ctrl+Alt+A or selecting Add to VCS from the context menu....
Read more >Delete files in iCloud Drive on iCloud.com - Apple Support
Files you delete from iCloud Drive are recoverable for 30 days, but you can remove deleted files before the 30-day time period is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Updated the docs to show the quotations.
It should be
ngf-keep="'distinct'"
note the quotation.