F
Filamentβ€’13mo ago
ba_mbi_07

reordering is not working if table has uuid primary column

I have a table with a UUID as the primary key and an integer column for positions. While trying to reorder the positions in my resource, I've encountered an issue where the reordering is not working Is there any solution for this?
5 Replies
Vp
Vpβ€’13mo ago
Please send some code πŸ˜•
ba_mbi_07
ba_mbi_07OPβ€’13mo ago
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name')->searchable()
TextColumn::make('slug')
TextColumn::make('category.name')
])
->reorderable('position')
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name')->searchable()
TextColumn::make('slug')
TextColumn::make('category.name')
])
->reorderable('position')
]);
}
Schema::create('coaches', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('name');
$table->string('slug')->unique();
$table->uuid('category_id');
$table->foreign('category_id')->references('id')->on('categories');
$table->string('image')->nullable();
$table->longText('description')->nullable();
$table->integer('position')->nullable();
$table->timestamps();
$table->softDeletes();
});
Schema::create('coaches', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('name');
$table->string('slug')->unique();
$table->uuid('category_id');
$table->foreign('category_id')->references('id')->on('categories');
$table->string('image')->nullable();
$table->longText('description')->nullable();
$table->integer('position')->nullable();
$table->timestamps();
$table->softDeletes();
});
this is my migration
Vp
Vpβ€’13mo ago
I've check and I think you're correct.. can you submit an issue to github?
ba_mbi_07
ba_mbi_07OPβ€’13mo ago
okay
Leander_ac
Leander_acβ€’12mo ago
@ba_mbi_07 Im having the same problem, did you manage to fix it or did you create the issue?
Want results from more Discord servers?
Add your server