Skip to content

Commit

Permalink
Seletbox add clear feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Aug 19, 2021
1 parent ac97b08 commit 3987c24
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 0 deletions.
7 changes: 7 additions & 0 deletions resources/assets/js/components/AkauntingSelect.vue
Expand Up @@ -11,6 +11,7 @@

<el-select v-model="selected" :placeholder="placeholder" filterable
@change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus"
:clearable="clearable"
:disabled="disabled"
:multiple="multiple"
:readonly="readonly"
Expand Down Expand Up @@ -247,6 +248,12 @@ export default {
description: "Selectbox disabled status"
},
clearable: {
type: Boolean,
default: true,
description: "Selectbox clearable status"
},
disabled: {
type: Boolean,
default: false,
Expand Down
8 changes: 8 additions & 0 deletions resources/assets/js/components/AkauntingSelectRemote.vue
Expand Up @@ -11,6 +11,7 @@

<el-select v-model="selected" :placeholder="placeholder" filterable remote reserve-keyword
@change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus"
:clearable="clearable"
:disabled="disabled"
:multiple="multiple"
:readonly="readonly"
Expand Down Expand Up @@ -110,6 +111,7 @@
<span v-else>
<el-select v-model="selected" :placeholder="placeholder" filterable remote reserve-keyword
@change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus"
:clearable="clearable"
:disabled="disabled"
:multiple="multiple"
:readonly="readonly"
Expand Down Expand Up @@ -338,6 +340,12 @@ export default {
description: "Selectbox disabled status"
},
clearable: {
type: Boolean,
default: true,
description: "Selectbox clearable status"
},
disabled: {
type: Boolean,
default: false,
Expand Down
Expand Up @@ -79,6 +79,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
6 changes: 6 additions & 0 deletions resources/views/partials/form/multi_select_group.blade.php
Expand Up @@ -57,6 +57,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
Expand Up @@ -81,6 +81,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
Expand Up @@ -59,6 +59,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
6 changes: 6 additions & 0 deletions resources/views/partials/form/select_add_new_group.blade.php
Expand Up @@ -73,6 +73,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
6 changes: 6 additions & 0 deletions resources/views/partials/form/select_group.blade.php
Expand Up @@ -51,6 +51,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
Expand Up @@ -75,6 +75,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
6 changes: 6 additions & 0 deletions resources/views/partials/form/select_group_group.blade.php
Expand Up @@ -53,6 +53,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
Expand Up @@ -75,6 +75,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down
6 changes: 6 additions & 0 deletions resources/views/partials/form/select_remote_group.blade.php
Expand Up @@ -53,6 +53,12 @@ class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset
:readonly="{{ $attributes['readonly'] }}"
@endif

@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif

@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
Expand Down

0 comments on commit 3987c24

Please sign in to comment.