Akaunting Select disabled options feature added
This commit is contained in:
		@@ -58,6 +58,7 @@
 | 
			
		||||
 | 
			
		||||
            <el-option v-if="!group" v-for="(option, index) in sortOptions"
 | 
			
		||||
                :key="index"
 | 
			
		||||
                :disabled="disabledOptions.includes(option.key)"
 | 
			
		||||
                :label="option.value"
 | 
			
		||||
                :value="option.key">
 | 
			
		||||
                <span class="float-left">{{ option.value }}</span>
 | 
			
		||||
@@ -68,6 +69,7 @@
 | 
			
		||||
                v-if="group"
 | 
			
		||||
                v-for="(group_options, name) in sortOptions"
 | 
			
		||||
                :key="name"
 | 
			
		||||
                :disabled="disabledOptions.includes(value)"
 | 
			
		||||
                :label="name">
 | 
			
		||||
                <el-option
 | 
			
		||||
                    v-for="(label, value) in group_options"
 | 
			
		||||
@@ -177,6 +179,14 @@ export default {
 | 
			
		||||
 | 
			
		||||
        options: null,
 | 
			
		||||
 | 
			
		||||
        disabledOptions: {
 | 
			
		||||
            type: Array,
 | 
			
		||||
            default: function () {
 | 
			
		||||
                return [];
 | 
			
		||||
            },
 | 
			
		||||
            description: "Selectbox Add New Item Feature"
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        option_sortable: {
 | 
			
		||||
            type: String,
 | 
			
		||||
            default: 'value',
 | 
			
		||||
 
 | 
			
		||||
@@ -154,6 +154,7 @@
 | 
			
		||||
 | 
			
		||||
            <el-option v-if="!group" v-for="(option, index) in sortOptions"
 | 
			
		||||
                :key="index"
 | 
			
		||||
                :disabled="disabledOptions.includes(option.key)"
 | 
			
		||||
                :label="option.value"
 | 
			
		||||
                :value="option.key">
 | 
			
		||||
                <span class="float-left">{{ option.value }}</span>
 | 
			
		||||
@@ -168,6 +169,7 @@
 | 
			
		||||
                <el-option
 | 
			
		||||
                    v-for="(label, value) in group_options"
 | 
			
		||||
                    :key="value"
 | 
			
		||||
                    :disabled="disabledOptions.includes(value)"
 | 
			
		||||
                    :label="label"
 | 
			
		||||
                    :value="value">
 | 
			
		||||
                    <span class="float-left">{{ label }}</span>
 | 
			
		||||
@@ -272,6 +274,14 @@ export default {
 | 
			
		||||
 | 
			
		||||
        options: null,
 | 
			
		||||
 | 
			
		||||
        disabledOptions: {
 | 
			
		||||
            type: Array,
 | 
			
		||||
            default: function () {
 | 
			
		||||
                return [];
 | 
			
		||||
            },
 | 
			
		||||
            description: "Selectbox Add New Item Feature"
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        option_sortable: {
 | 
			
		||||
            type: String,
 | 
			
		||||
            default: 'value',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user