Rule Builder labels being truncated

Hi, I am currently using the new Rule Builder feature in a form.
return $form
->schema([
Section::make()
->schema([
TextInput::make('name')
->label('Segment Name')
->required()
->unique(ignoreRecord: true),
]),
Section::make('Define Rules')
->schema([
RuleBuilder::make('rules')
->constraints(static::getConstraints())
->blockPickerColumns(5)
->blockPickerWidth(MaxWidth::FiveExtraLarge->value),
]),
]);
return $form
->schema([
Section::make()
->schema([
TextInput::make('name')
->label('Segment Name')
->required()
->unique(ignoreRecord: true),
]),
Section::make('Define Rules')
->schema([
RuleBuilder::make('rules')
->constraints(static::getConstraints())
->blockPickerColumns(5)
->blockPickerWidth(MaxWidth::FiveExtraLarge->value),
]),
]);
Everything works perfectly except the label of the rules. Since the labels are a bit longer they are truncated and It is difficult to guess the label. Is there any way we can wrap the text of label. Sorry I am not proficient with css.
No description
4 Replies
Dennis Koch
Dennis Koch4mo ago
Why don't you just reduce it to 4 columns then?
saineshmamgain
saineshmamgainOP4mo ago
I've tried reducing to four columns but still the labels are large and they keep on getting truncated. Is there any way to fix the css of the labels. I'll try to fix the labels if you could point me to the right direction.
Dennis Koch
Dennis Koch4mo ago
They probably have a truncate class on them. You need to check what truncate does and apply some CSS to revert it.
saineshmamgain
saineshmamgainOP4mo ago
Ok thank you so much for your help. I'll try this. so I published filament/component/dropdown/list/item.blade.php and added whitespace-normal class and it worked. I don't know what it will break at other places. Is there a way to conditionally handle this?
Want results from more Discord servers?
Add your server