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

[#1697] Grid > Custom Context Menu > Column List > 기본 선택된 컬럼 지정 및 체크박스 disabled 처리 #1698

Merged
merged 4 commits into from
Aug 23, 2024

Conversation

chichoon
Copy link
Collaborator

@chichoon chichoon commented Jul 3, 2024

작업 배경

image

  • Grid Option > Column List에서 체크박스를 통해 컬럼을 가릴 수 있는데, 특정 컬럼 (ex: Name) 은 데이터 식별 시 반드시 필요한 값이기 때문에 컬럼을 hidden 처리 하는 것은 의미가 없다는 의견이 있었습니다
  • 따라서 그러한 컬럼의 경우, hidden 처리 할 수 없도록 체크박스 disabled 처리 할 수 있게끔 option 에 항목을 추가했습니다

변경 사항 요약

useGridSetting: {
  use: useGridSettingMV,
  useDefaultColumnSetting: useGridDefaultSettingMV,
  customContextMenu: gridSettingMenuItems,
  disabledColumnInContextMenu: ['userName'],
},
  • options > useGridSetting > disabledColumnInContextMenu 필드 추가
  • 배열로 컬럼 field 값을 넘기면 해당 컬럼들은 체크박스 비활성화 처리됩니다

…스 disabled 처리

##############
- disable 시키는 기능 구현
@changwonzzangzzang
Copy link
Collaborator

changwonzzangzzang commented Jul 3, 2024

image

혹시 이 경우도 고려되었을까요?

추가적으로 의견인데 컬럼 값에 fixed? 같은 값을 추가하여 처리하는 방식은 어떤가요?
값이 있는 경우만 disabled 처리하면 사이드이펙트 최소화 하여서 처리할 수 있지 않을까 싶은데

@chichoon
Copy link
Collaborator Author

혹시 이 경우도 고려되었을까요?

추가적으로 의견인데 컬럼 값에 fixed? 같은 값을 추가하여 처리하는 방식은 어떤가요? 값이 있는 경우만 disabled 처리하면 사이드이펙트 최소화 하여서 처리할 수 있지 않을까 싶은데

컬럼 클릭시 출력되는 필터부분 생각을 못했었는데 이 경우 컬럼지정을 문자열 배열로 하는 것보다 말씀해주신 대로 컬럼 옵션 필드를 추가하는 게 나을 듯하여 해당 방향으로 추가수정 해보겠습니다 🫡

@chichoon chichoon marked this pull request as draft August 22, 2024 05:34
…스 disabled 처리

##############
- option disabled 필드 대신 column 데이터에 fixed 필드 추가
…스 disabled 처리

##############
- fixed column 인 경우 column context menu 에서 hide 처리 불가능
@chichoon
Copy link
Collaborator Author

image

  • 기존처럼 옵션에 disabledColum 필드 사용하는 대신, 컬럼값 (GridColumn) 내부에 fixed 필드 추가하여 해당 필드로 고정 제어 할 수 있도록 수정했습니다
  • 컬럼 클릭하여 column context 열었을 때, fixed 필드가 true 인 경우 hide 설정 비활성화

관련 이슈가 hold 처리되면서 본 PR 수정이 늦어졌습니다 ,, 코멘트 감사합니다~~ @changwonzzangzzang

@chichoon chichoon marked this pull request as ready for review August 22, 2024 06:59
@chichoon chichoon merged commit f9fff4e into 3.0 Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grid > Custom Context Menu > Column List > 기본 선택된 컬럼 지정 및 체크박스 disabled 처리
3 participants