We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filament/filament
V3.2.0
v11
No response
PHP 8.3
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.
When using tabs, Chinese characters should be handled correctly.
Tabs\Tab::make(__('基本信息'))->schema([ TextInput::make('title') ->label(__('Post Title')) ->required() ->maxLength(255) ->live(onBlur: true)]), Tabs\Tab::make(__('(E)扩展信息'))->schema([ Placeholder::make(__('扩展信息')), Hidden::make('user_id') ->default(auth()->user()->id) ->required(), Hidden::make('post_type') ->default('post') ->required()])
When I use the above code, the error occurs. If I change it to the following code, the result is correct.
Tabs\Tab::make(__('Title '))->schema([ TextInput::make('title') ->label(__('Post Title')) ->required() ->maxLength(255) ->live(onBlur: true)]), Tabs\Tab::make(__('Other Info '))->schema([ Placeholder::make(__('扩展信息')), Hidden::make('user_id') ->default(auth()->user()->id) ->required(), Hidden::make('post_type') ->default('post') ->required()])
https://github.com/cityisempty/filament-issue
The text was updated successfully, but these errors were encountered:
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)));
Sorry, something went wrong.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: