Skip to content

Commit

Permalink
fix: column altered to handle empty name
Browse files Browse the repository at this point in the history
  • Loading branch information
sriramkanakam87 committed Aug 28, 2024
1 parent 583e295 commit 3b831eb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ public function table(Table $table): Table
->defaultImageUrl(url('/images/placeholder.png')),
Tables\Columns\TextColumn::make('id')->searchable()->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('identifier')->searchable()->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('name')->searchable()
Tables\Columns\TextColumn::make('identifier')
->label('Details')
->formatStateUsing(
fn (Molecule $molecule): HtmlString => new HtmlString("<strong>ID:</strong> {$molecule->id}<br><strong>Identifier:</strong> {$molecule->identifier}<br><strong>Name:</strong> {$molecule->name}")
)
->description(fn (Molecule $molecule): string => $molecule->standard_inchi)
->wrap(),
Tables\Columns\TextColumn::make('name')
->searchable()
->wrap()
->lineClamp(6)
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('synonyms')
->searchable()
->wrap()
Expand Down

0 comments on commit 3b831eb

Please sign in to comment.