Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.

Commit 0a68383

Browse files
committed
Update README
1 parent 48ba349 commit 0a68383

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,29 @@ public static function form(Form $form): Form
204204
}
205205
```
206206

207+
### Nullable
208+
209+
***Default: false***
210+
211+
To make the color picker nullable you can call the `nullable` method:
212+
213+
```php
214+
public static function form(Form $form): Form
215+
{
216+
return $form
217+
->schema([
218+
\RVxLab\FilamentColorPicker\Forms\ColorPicker::make('color')
219+
->nullable(),
220+
]);
221+
}
222+
```
223+
224+
#### Known issue
225+
226+
Because Vanilla Picker does not handle null values properly the default initial value of a null-ed picker will be `#000000` or `#00000000` depending on the `alpha` setting.
227+
228+
This goes away when the picker is updated or the form is saved.
229+
207230
## Color swatch
208231

209232
To display a swatch on the table you can add the following column:

0 commit comments

Comments
 (0)