퍼블 반영 2025-07-22 at 오전 9:14까지 완료
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2276,7 +2276,30 @@ function SelectBox() {
|
|||||||
|
|
||||||
function openState() {
|
function openState() {
|
||||||
setState({state: "open"});
|
setState({state: "open"});
|
||||||
if (props.type === "bottomSheet") selectDimmShow($target.querySelector(selectDimm));
|
|
||||||
|
if (props.type === "bottomSheet") {
|
||||||
|
// select-scroll 높이 동적 계산
|
||||||
|
const selectOptions = $target.querySelector('.select-options');
|
||||||
|
const selectHeader = $target.querySelector('.select-header');
|
||||||
|
const selectScroll = $target.querySelector('.select-scroll');
|
||||||
|
|
||||||
|
if (selectOptions && selectHeader && selectScroll) {
|
||||||
|
// 전체 디바이스 높이의 75% (25% 제외)
|
||||||
|
const deviceHeight = window.innerHeight;
|
||||||
|
const targetHeight = deviceHeight * 0.75;
|
||||||
|
|
||||||
|
// select-header 높이 계산
|
||||||
|
const headerHeight = selectHeader.offsetHeight;
|
||||||
|
|
||||||
|
// 최종 높이 계산 (여백 고려)
|
||||||
|
const scrollHeight = targetHeight - headerHeight - 32; // 32px는 여백
|
||||||
|
|
||||||
|
// CSS 변수로 설정
|
||||||
|
selectOptions.style.setProperty('--select-scroll-height', `${scrollHeight}px`);
|
||||||
|
}
|
||||||
|
|
||||||
|
selectDimmShow($target.querySelector(selectDimm));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeState() {
|
function closeState() {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user