Skip to content

Commit

Permalink
Merge pull request #72 from ronysilvati/patch-2
Browse files Browse the repository at this point in the history
New feacture: Import same csv file again;
  • Loading branch information
bahaaldine authored Jan 7, 2018
2 parents 479f7b4 + 740dbcd commit 923f17d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dist/angular-csv-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ csvImport.directive('ngCsvImport', function() {
mdInputClass: '@?',
mdButtonTitle: '@?',
mdSvgIcon: '@?',
uploadButtonLabel: '='
uploadButtonLabel: '=',
lockImportSameFile:'=?'
},
template: function(element, attrs) {
var material = angular.isDefined(attrs.material);
Expand Down Expand Up @@ -143,6 +144,10 @@ csvImport.directive('ngCsvImport', function() {
});
}
}

if(!scope.lockImportSameFile){
angular.element(document).find('.ng-csv-import.ng-isolate-scope input[type="file"]')[0].value = null;
}
});

var csvToJSON = function(content) {
Expand Down

0 comments on commit 923f17d

Please sign in to comment.