Describe the bug
grid.setColumns(columnOptions)를 한번 실행하고 나면
filter가 "select"인 필터에서 마우스 클릭으로
● 1번항목
○ 2번항목
● 3번항목
● 4번항목
이렇게 필터링 시 리스트에 아무것도 뜨지 않습니다.
To Reproduce
Steps to reproduce the behavior:
- Go to grid.setColumns(columnOptions)를 한번 실행
- Click on filter가 "select"인 필터에서 마우스 클릭으로 필터링
- Scroll down to '....'
- See error 아무것도 안뜸
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 10
- Browser chrome
- Version 4.21.22
Additional context
Add any other context about the problem here.
아래 함수가 문제인 것으로 보입니다.
function createColumnFilterOption(filter) {
var defaultOption = {
type: common_1.isObject(filter) ? filter.type : filter,
showApplyBtn: false,
showClearBtn: false,
};
if (common_1.isString(filter)) {
if (filter === 'select') {
return tslib_1.__assign(tslib_1.__assign({}, defaultOption), { operator: 'OR' });
}
}
if (common_1.isObject(filter)) {
return tslib_1.__assign(tslib_1.__assign({}, defaultOption), (filter.type === 'select'
? common_1.omit(filter, 'showApplyBtn', 'showClearBtn', 'operator', 'options')
: filter));
}
return defaultOption;
}
첫번째 if 문에서
filter가 'select' 인 경우에 { operator: 'OR' }로 assign 해주고 있는데
두번째 if문에서는
filter.type === 'select' 인 경우에 'operator'를 omit 해주고 있습니다.
'showApplyBtn', 'showClearBtn', 'options' 는 omit 하는게 맞아 보이는데
'operator'는 omit 하면 안되는 것 아닌가요?
일단 저는 급한대로 'operator' 를 omit 대상에서 제외해서 사용하고 있습니다.
Describe the bug
grid.setColumns(columnOptions)를 한번 실행하고 나면
filter가 "select"인 필터에서 마우스 클릭으로
● 1번항목
○ 2번항목
● 3번항목
● 4번항목
이렇게 필터링 시 리스트에 아무것도 뜨지 않습니다.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
아래 함수가 문제인 것으로 보입니다.
function createColumnFilterOption(filter) {
var defaultOption = {
type: common_1.isObject(filter) ? filter.type : filter,
showApplyBtn: false,
showClearBtn: false,
};
if (common_1.isString(filter)) {
if (filter === 'select') {
return tslib_1.__assign(tslib_1.__assign({}, defaultOption), { operator: 'OR' });
}
}
if (common_1.isObject(filter)) {
return tslib_1.__assign(tslib_1.__assign({}, defaultOption), (filter.type === 'select'
? common_1.omit(filter, 'showApplyBtn', 'showClearBtn', 'operator', 'options')
: filter));
}
return defaultOption;
}
첫번째 if 문에서
filter가 'select' 인 경우에 { operator: 'OR' }로 assign 해주고 있는데
두번째 if문에서는
filter.type === 'select' 인 경우에 'operator'를 omit 해주고 있습니다.
'showApplyBtn', 'showClearBtn', 'options' 는 omit 하는게 맞아 보이는데
'operator'는 omit 하면 안되는 것 아닌가요?
일단 저는 급한대로 'operator' 를 omit 대상에서 제외해서 사용하고 있습니다.