valentin-morice / filament-json-column

A simple package to view and edit your JSON columns in Filament
MIT License
17 stars 4 forks source link

How to dissable auto sort #6

Closed Traineratwot closed 1 week ago

Traineratwot commented 1 week ago

Hello a have a json like this

{
  "foo":1,
  "Bar":2
}

I need save this in this order BUT i see in database

{
   "Bar": 2,
   "foo": 1
}

Please add setting to disable auto sort like that

FilamentJsonColumn::make('data')->disableAutoSort()
Traineratwot commented 1 week ago

I am so sorry, This problem turned out to be because of the database and not because of your component

It turned out that mysql with the json data type automatically sorts the data

valentin-morice commented 1 week ago

Thanks for the feedback, glad the issue resolved itself!