protected $_columnType = 'string';
protected $_allowsAlpha = true;
+ protected $_allowsEmpty = false;
public function getDefaultAttributes()
{
- return array_merge(parent::getDefaultAttributes(), ['allows_alpha' => $this->_allowsAlpha]);
+ return array_merge(parent::getDefaultAttributes(), ['allows_alpha' => $this->_allowsAlpha, 'allows_empty' => $this->_allowsEmpty]);
}
}
type="text"
class="spectrum"
data-show-alpha="{{$field['allows_alpha']?'true':'false'}}"
+ data-allow-empty="{{$field['allows_empty']?'true':'false'}}"
name="{{ $field['name'] }}"
value="{{ old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '' }}"
@include('crud::fields.inc.attributes')
preferredFormat: "hex6",
showInput: true,
showInitial: true,
- allowEmty: true,
});
</script>
@endpush