Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_serializeFilter in cosmoz-omnitable-column does not serialize #166

Open
plequang opened this issue Apr 3, 2018 · 3 comments
Open

_serializeFilter in cosmoz-omnitable-column does not serialize #166

plequang opened this issue Apr 3, 2018 · 3 comments
Assignees

Comments

@plequang
Copy link
Contributor

plequang commented Apr 3, 2018

Description

In cosmoz-omnitable-column, the function _serializeFilter from cosmoz-omnitable-column-behavior is overridden, and simply returns the filter object.

_serializeFilter(filter = this.filter) {
return filter || null;
},

This behavior is verified by a unit test:

test('_serializeFilter returns filter', () => {
const column = omnitable.columns.find(col => {
return col.name === 'columnWithGroupOn';
}),
filter = {key: 'value'};
assert.deepEqual(column._serializeFilter(filter), filter);
});

If this is really the desired behavior, there should be at least a comment that explain why this is so.

@megheaiulian
Copy link
Collaborator

In cosmoz-omnitable-column filter is a String. Because of that there is nothing to serialize, deserialize and we just need to check for falsy values ('', null, undefined).

@megheaiulian
Copy link
Collaborator

I think we should explicitly re-define the filter property as String in cosmoz-omnitable-column to make this a bit easier to understand.

@nomego
Copy link
Contributor

nomego commented Jun 18, 2018

Still an issue @megheaiulian ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants