Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

sortable and locked properties not working on ColumnDefinition

Open serkyen opened this issue 7 years ago • 6 comments

Griddle version

"griddle-react": "^1.3.1",

Expected Behavior

If I include sortable={false} as one of the properties for ColumnDefinition, I expect that if I click the header, I do not see an arrow appear and the sorting does not happen in the table.

If I include the locked={false} as one of the properties for ColumnDefinition, I expect that in the settings, I do not see a checkbox to be able to enable or disable that particular column.

Actual Behavior

Nothing. Neither of these properties have any effect.

Steps to reproduce

<RowDefinition>
    <ColumnDefinition order={1} sortable={false} locked={true} title=" " id="checkbox" customHeadingComponent={SelectAllCell} customComponent={enhancedWithRowData(SelectCell)}/>
    <ColumnDefinition order={2} sortable={false} title=" " id="image" customComponent={ImageCol}/>
    <ColumnDefinition order={3} title="First Name" id="firstName"/>
    <ColumnDefinition order={4} title="Last Name" id="lastName"/>
    <ColumnDefinition order={5} title="Email" id="email"/>
    <ColumnDefinition order={6} title="Company" id="company"/>
    <ColumnDefinition order={7} title="Category" id="category"/>
    <ColumnDefinition order={8} title="Date Created" id="createdAt" customComponent={CreatedAtCol}/>
    <ColumnDefinition order={9} sortable={false} title=" " id="action" customComponent={enhancedWithRowData(ActionButtons)} customComponentMetadata={{view:true, edit:true, copy:true, remove:true}} />
</RowDefinition>

Thanks for any assistance.

serkyen avatar Jul 28 '17 12:07 serkyen

I agree these are broken in 1.3.1. Looks like "locked" is not even implemented at all in the code.

Sortable has some implementation on master, but I did not test newest version.

sww314 avatar Jul 28 '17 13:07 sww314

That's unfortunate. Ok thanks.

serkyen avatar Jul 29 '17 00:07 serkyen

Any updates on this?

I recently switched over from v0.8.1 to the v1.10.1 and there's a lot of basic functionality like this that's now broken or a lot more obfuscated. :(

brendanluna avatar Dec 20 '17 00:12 brendanluna

@blunatic I assume you mean an updated on support for locked? I expect sortable would work as of https://github.com/GriddleGriddle/Griddle/pull/653.

dahlbyk avatar Dec 20 '17 20:12 dahlbyk

@dahlbyk Sorry for not being specific. Setting sortable to false doesn't seem to have any effect on my ColumnDefinitions for me.

brendanluna avatar Dec 20 '17 20:12 brendanluna

Sorry for not being specific. Setting sortable to false doesn't seem to have any effect on my ColumnDefinitions for me.

@blunatic odd. I just confirmed on master (1.11.1) that this story seems to work as expected. Can you provide a repro?

dahlbyk avatar Dec 24 '17 17:12 dahlbyk