@statezero/core 0.2.32 → 0.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,8 +45,10 @@ function routeCreateOperation(operation, applyAction) {
45
45
  const currentCount = store.groundTruthPks?.length || 0;
46
46
  // At capacity: check if ordering could affect position
47
47
  if (currentCount >= limit) {
48
- const hasCustomOrdering = store.queryset._orderBy && store.queryset._orderBy.length > 0;
49
- if (hasCustomOrdering) {
48
+ // Check explicit ordering on queryset OR implicit ordering from Django Meta
49
+ const hasExplicitOrdering = store.queryset._orderBy && store.queryset._orderBy.length > 0;
50
+ const hasImplicitOrdering = (modelClass.schema?.default_ordering?.length || 0) > 0;
51
+ if (hasExplicitOrdering || hasImplicitOrdering) {
50
52
  // With ordering, new item could displace existing items - can't know without server
51
53
  operationRegistry.setQuerysetState(operation.operationId, semanticKey, OperationMembership.MAYBE);
52
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "type": "module",
5
5
  "module": "ESNext",
6
6
  "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",