Open cityisempty opened 2 months ago
The issue comes from forms/src/Components/Tabs/Tab.php infolists/src/Components/Tabs/Tab.php
final public function __construct(string $label)
{
$this->label($label);
$this->id(Str::slug($label));
}
Str::slug($title, $separator = '-', $language = 'en', $dictionary = ['@' => 'at'])
The language parameter defaults to en, and when encountering Chinese characters, it results in an empty string.
I recommend modifying it to:
$this->id(Str::slug(Str::transliterate($label, strict: true)));
Package
filament/filament
Package Version
V3.2.0
Laravel Version
v11
Livewire Version
No response
PHP Version
PHP 8.3
Problem description
When I have two tabs in the form, if both tabs have Chinese titles, then their contents are merged into one, and both tabs are in a selected state.
Expected behavior
When using tabs, Chinese characters should be handled correctly.
Steps to reproduce
When I use the above code, the error occurs. If I change it to the following code, the result is correct.
Reproduction repository (issue will be closed if this is not valid)
https://github.com/cityisempty/filament-issue
Relevant log output
No response
Donate 💰 to fund this issue