<commit_before>define([
	"dijit/form/FilteringSelect","dojo/_base/declare",
	"dojo/store/JsonRest"
], function(
	FilteringSelect, declare, 
	Store
){
	
	return declare([FilteringSelect], {
		apiServiceUrl: window.App.dataAPI,
		promptMessage:'NCBI Taxonomy ID.',
		missingMessage:'NCBI Tax ID is not specified.',
		placeHolder:'',
		searchAttr: "taxon_id",
		//query: "?&select(taxon_id)",
		query: {select: "taxon_name,taxon_id"},
		queryExpr: "${0}",
		autoComplete: false,
		store: null,

		constructor: function(){
			if (!this.store){
				this.store = new Store({target: this.apiServiceUrl + "/taxonomy/", idProperty: "taxon_id", header: {accept: "application/json"}});
			}
		}
		/*validate: function (){
			// Overrides `dijit/form/TextBox.validate`
			this.valueNode.value = this.toString();
			return this.inherited(arguments);
		},
		isValid: function (){
			// Overrides ValidationTextBox.isValid()
			return !!this.item || (!this.required && this.get('displayedValue') == ""); // #5974
		}*/	
	});<commit_msg>Fixing required bug for taxid selector<commit_after>define([
	"dijit/form/FilteringSelect","dojo/_base/declare",
	"dojo/store/JsonRest"
], function(
	FilteringSelect, declare, 
	Store
){
	
	return declare([FilteringSelect], {
		apiServiceUrl: window.App.dataAPI,
		promptMessage:'NCBI Taxonomy ID.',
		missingMessage:'NCBI Tax ID is not specified.',
		placeHolder:'',
		searchAttr: "taxon_id",
		//query: "?&select(taxon_id)",
		query: {select: "taxon_name,taxon_id"},
		queryExpr: "${0}",
		autoComplete: false,
		store: null,
		required: false,

		constructor: function(){
			if (!this.store){
				this.store = new Store({target: this.apiServiceUrl + "/taxonomy/", idProperty: "taxon_id", header: {accept: "application/json"}});
			}
		},
		/*
		validate: function (){
			// Overrides `dijit/form/TextBox.validate`
			this.valueNode.value = this.toString();
			return this.inherited(arguments);
		}*/
		isValid: function (){
			// Overrides ValidationTextBox.isValid()
			var error= !this.inherited(arguments);
			return !(error && this.required);
			//return !!this.item || (!this.required && this.get('displayedValue') == ""); // #5974
		}
	});
{'fraction_non_alphanumeric': 0.17750115260488705, 'fraction_numerical': 0.004610419548178884, 'mean_word_length': 4.3316953316953315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5091251', 'n_tokens_mistral': 811, 'n_tokens_neox': 731, 'n_words': 143}