# Collapse grid view by default?

**URL:** <https://speciforum.org/t/collapse-grid-view-by-default/2786>\
**Category:** Get Help\
**Created:** [August 21, 2025, 12:19pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786 "2025-08-21T12:19:41Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![pverley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/pverley/32/1413_2.png) [@pverley](https://speciforum.org/u/pverley)\
**Post date:** [August 21, 2025, 12:19pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/1 "2025-08-21T12:19:41Z")

</div>

_[using Sp-7.11.1 at the time of writing]_

Hi there,

I configured the preparation subview in order to display grid/table view by default:

```xml
<row>
  <cell type="subview" viewname="Preparation_4" id="8" name="preparations" colspan="14" rows="3" defaulttype="table"/>
</row>

```

It works as intended:

 ![cay-sp7-expanded-grid-preparations](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/0/05dce6a22f4cec6b82120d125a83aa10e188a014.png)

Nonetheless, the preparations are **expanded by default** , and I would like them **collapsed by default** :

 ![cay-sp7-preparation-grid](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/d068897d63d36c94f57a0632cdda2bc09bfe7ad8.png)

I searched carefully 🧐 in the [Editing Forms in Specify](https://speciforum.org/t/editing-forms-in-specify/1557) and [Github issues](https://github.com/specify/specify7/issues), but I found nothing relevant for that matter.

I tried to play around with the `view` definition, by setting the Preparation Table view as the default one, without much success:

```xml
<view name="Preparation_4" objtitle="Preparation" class="edu.ku.brc.specify.datamodel.Preparation"
    busrules="edu.ku.brc.specify.datamodel.busrules.PreparationBusRules">
    <altviews>
        <altview name="Preparation_4 View" viewdef="Preparation_4" mode="view" />
        <altview name="Preparation_4 Edit" viewdef="Preparation_4" mode="edit" />
        <altview name="Preparation_4 Table View" viewdef="Preparation_4 Table" mode="view"
            default="true" />
        <altview name="Preparation_4 Table Edit" viewdef="Preparation_4 Table" mode="edit" />
    </altviews>
</view>

```

❓ Is there a way to achieve **collapsed grid/table view by default** please?

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [August 28, 2025, 2:50pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/2 "2025-08-28T14:50:42Z")

</div>

Hey @pverley, I actually started experiencing the same issue after making an edit to one of our preparation table view defs 2 weeks ago. All I did was remove a single field from both the expanded and collapsed view def xml, but for some reason, it always displays as expanded by default now. I tried reverting it to what I had previously, and it also didn’t seem to work.

If you find a solution please let me know! And if not, Specify team, we want to know how to fix this too. 🙂

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [September 3, 2025, 6:47pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/3 "2025-09-03T18:47:54Z")

</div>

Hi @nfshoobs and @pverley,

Can you share your full form definition(s) with me so I can take a look? Thank you!

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [September 3, 2025, 6:56pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/4 "2025-09-03T18:56:02Z")

</div>

[OSUM IZ.xml](https://speciforum.org/uploads/short-url/hrBvakubLpDXviWGVqHW3Eg48Ak.xml) (168.8 KB)  
Sure, here you go!

---

<div class="post-metadata">

**Author:** ![pverley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/pverley/32/1413_2.png) [@pverley](https://speciforum.org/u/pverley)\
**Post date:** [September 3, 2025, 9:16pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/5 "2025-09-03T21:16:15Z")

</div>

[NOU-AUBLET3.xml](https://speciforum.org/uploads/short-url/xzLBsIHVjdTXyLo6SuM9n4TfBPc.xml) (182.5 KB)  
Here’s NOU full form definition. Thanks Grant!

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [September 5, 2025, 8:15pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/6 "2025-09-05T20:15:20Z")

</div>

Hi @nfshoobs and @pverley,

On our [demo instance](https://sp7demofish.specifycloud.org/specify/), I loaded the full form definition [OSUM IZ.xml](https://speciforum.org/uploads/short-url/hrBvakubLpDXviWGVqHW3Eg48Ak.xml)

The behavior I expected, and what I observed, is as follows:

- When adding a new Preparation, the subview is expanded by default. Adding a subsequent Preparation does not collapse the ones entered earlier.

- When viewing a Collection Object record, all Preparations are collapsed by default.

- After importing [NOU-AUBLET3.xml](https://speciforum.org/uploads/short-url/xzLBsIHVjdTXyLo6SuM9n4TfBPc.xml), I see the same:

The current, expected behavior is to expand newly added items to a subview and this is _not_ configurable ([code reference](https://github.com/specify/specify7/blob/214866318d0d0ae390fc06b66662979a50d60674/specifyweb/frontend/js_src/lib/components/FormCells/FormTable.tsx#L130-L145)).

Just to confirm, you looking to have the subview show every Preparation as **collapsed** by default when they are added to the form?

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [September 5, 2025, 8:39pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/7 "2025-09-05T20:39:25Z")

</div>

Hey @Grant,  
Thanks for looking into this. The issue is not with preparations expanding the grid view by default when they are added. As you point out, that is the expected behavior and has always been the case.

What we are experiencing (I think we are both experiencing the same thing, but perhaps @pverley is not) is that editing the viewdef file to remove a field caused all CO records to automatically expand all preparations by default whenever you load an existing record.

That is unexpected and unwanted behavior, the way it used to be was that grids were collapsed by default upon pageload.  
See [https://invertebrates.osu.edu/specify/view/collectionobject/498055/](https://invertebrates.osu.edu/specify/view/collectionobject/498055/) for an example, the preparations are all expanded when the page opens.

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [September 8, 2025, 6:26pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/8 "2025-09-08T18:26:52Z")

</div>

@pverley –

Is this the same issue you are seeing?

@nfshoobs –

Thank you for sharing that link! I see the same as you on your database, but I cannot recreate on my end. Can you [send me a copy of the database](https://speciforum.org/t/send-a-backup-to-specify/767) so I can take a look in a development environment?

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [September 8, 2025, 6:41pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/9 "2025-09-08T18:41:42Z")

</div>

Sure, what’s the most efficient way for me to send you a backup?

I had an idea – it may be due to a conflict between two viewdefs, one (common.views) added by Bronwyn a few months ago that I’m still kind of confused about the purpose of. I’ll prep a DB dump for you, but in the meantime, could you try uploading common.views into the demo instance and see whether it recreates the behavior?

> **(attachments)**
>
> [common.views.xml](https://speciforum.org/uploads/short-url/2IRTzDYZkGXLxMdt8xMbhNkuNFl.xml) (402 KB)

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [September 8, 2025, 6:43pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/10 "2025-09-08T18:43:56Z")

</div>

Hi @nfshoobs,

I’ll take a look at that as well!

You can follow these steps to share the database:

1. Go to our [Hightail page](https://spaces.hightail.com/uplink/specify): [Hightail](https://spaces.hightail.com/uplink/specify)
2. Enter your email address and any notes.
3. Click **Select a file** , choose your backup archive, then click **Send It**.

---

<div class="post-metadata">

**Author:** ![pverley](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/pverley/32/1413_2.png) [@pverley](https://speciforum.org/u/pverley)\
**Post date:** [September 8, 2025, 7:52pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/11 "2025-09-08T19:52:58Z")

</div>

> [@Grant](#):
>
> @pverley –
> 
> Is this the same issue you are seeing?

**Yes, it is**. When I open a CO form with existing preparations and scroll down to the Preparations subview every prep is expanded by default.

Unfortunately my memories are not as sharp as Nate and I cannot relate it with any change in the form (though it is possible).

Seeing your animation, I tried to reproduce it step by step and here is what I see:

1. I opened an existing CO form with several preparations =\> preparation views are expanded
2. I added a new preparation (expanded by default, as expected when one create a new entry) and saved =\> CO view get refreshed and preparation views are collapsed
3. I refreshed my page =\> preparation views are expanded
4. I deleted the bogus preparation (the one added at step 2) and saved the CO =\> CO view get refreshed and preparation views are collapsed

![nou-sp7-gridded-preparations](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/9/97ff1abd0a69863ac0a5e15e65e2a2cec28c1032.gif)

Thanks for you time on this issue 🙏

---

<div class="post-metadata">

**Author:** ![Elizabeth](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@Elizabeth](https://speciforum.org/u/Elizabeth)\
**Post date:** [October 21, 2025, 3:33pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/12 "2025-10-21T15:33:03Z")

</div>

Hi @nfshoobs and @pverley,

It looks like this issue has to do with CO\_CREATE\_PREP being set to true in remote preferences, which I wrote up on GitHub [here](https://github.com/specify/specify7/issues/7508). A current workaround to this would be to set CO\_CREATE\_PREP to false, however, we do plan on fixing this so it works like it did before 7.11.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/18a843c97bc32b40e8ad0e035755bc88ffaacaf7.svg) [@system](https://speciforum.org/u/system)\
**Post date:** [October 28, 2025, 3:33pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/13 "2025-10-28T15:33:35Z")

</div>

Closed on October 28, 2025, 3:33pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [October 29, 2025, 4:49pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/14 "2025-10-29T16:49:13Z")

</div>

Opened on October 29, 2025, 4:49pm UTC



---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [October 29, 2025, 4:51pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/15 "2025-10-29T16:51:23Z")

</div>

Hi @nfshoobs and @pverley,

One of our developers has pushed a fix and this will be solved in an upcoming release! Thank you both again for your report and feedback!

> <https://github.com/specify/specify7/pull/7521>
>
> Fixes #7508
> 
> When CO\_CREATE\_PREP\_\<collectionId\>=true, v7.11 started rendering …every existing preparation row expanded in the Collection Object form because the FormTable component seeded its isExpanded state based solely on that preference flag for all preparations. The fix restores the intended behavior by only defaulting rows to expanded if the resource is both a preparation and newly created, keeping existing preparations collapsed while still auto-expanding ones that are added during the current session.
> 
> \### Checklist
> 
> \- \[\] Self-review the PR after opening it to make sure the changes look good and
> self-explanatory (or properly documented)
> \- \[\] Add relevant issue to release milestone
> \- \[\] Add pr to documentation list
> 
> \### Testing instructions
> \- \[\] Verify that toggling CO\_CREATE\_PREP\_(CollectionID)=true in remote preferences leaves existing preparations collapsed while newly created preparations still open automatically.

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [February 13, 2026, 4:00pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/16 "2026-02-13T16:00:39Z")

</div>

Hey @Grant, I was thinking this fix had yet to be implemented, but I see now it’s been merged and the fix should be implemented in the current Sp7 version. However, I still see the auto-expanded behavior when CO\_CREATE\_PREP\_(CollectionID)=true. Any idea why?

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [February 13, 2026, 4:20pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/17 "2026-02-13T16:20:46Z")

</div>

Hi @nfshoobs,

This will be included in the 7.12.0 release, which is expected to arrive within the next month or so! You can see which release it is planned for/included in by looking for the **Milestone** subheading on the right side:

 ![Milestone subheading highlighted with a red outline on a GitHub issue](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/2/255a826d88ee3c494826742a1a3f8982d8f70443.png)

---

<div class="post-metadata">

**Author:** ![nfshoobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/nfshoobs/32/3979_2.png) [@nfshoobs](https://speciforum.org/u/nfshoobs)\
**Post date:** [February 13, 2026, 5:54pm UTC](https://speciforum.org/t/collapse-grid-view-by-default/2786/18 "2026-02-13T17:54:21Z")

</div>

Ah, great! Thanks 🙂
