improve tags
This commit is contained in:
parent
e95e13d8f9
commit
b6c9bfe1f8
|
@ -155,8 +155,8 @@ class Form extends Model
|
||||||
|
|
||||||
public function setTagsAttribute($value)
|
public function setTagsAttribute($value)
|
||||||
{
|
{
|
||||||
if ($value == null || $value == '') {
|
if ($value == '') {
|
||||||
$value = '[]';
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['tags'] = json_encode($value);
|
$this->attributes['tags'] = json_encode($value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,8 +61,8 @@
|
||||||
<slot name="option" :option="item" :selected="isSelected(item)" />
|
<slot name="option" :option="item" :selected="isSelected(item)" />
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<p v-else-if="!loading" class="w-full text-gray-500 text-center py-2">
|
<p v-else-if="!loading && !(allowCreation && searchTerm)" class="w-full text-gray-500 text-center py-2">
|
||||||
No option available.
|
{{ (allowCreation ? 'Type something to add an option': 'No option available') }}.
|
||||||
</p>
|
</p>
|
||||||
<li v-if="allowCreation && searchTerm" role="option"
|
<li v-if="allowCreation && searchTerm" role="option"
|
||||||
class="text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 cursor-pointer group hover:text-white hover:bg-nt-blue focus:outline-none focus:text-white focus:bg-nt-blue"
|
class="text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 cursor-pointer group hover:text-white hover:bg-nt-blue focus:outline-none focus:text-white focus:bg-nt-blue"
|
||||||
|
|
Loading…
Reference in New Issue