Merge branch 'susu' into dev
# Conflicts: # front/src/main/resources/static/assets/scripts/temp/component/concat.js
This commit is contained in:
@@ -315,6 +315,7 @@
|
||||
|
||||
function refreshTree(currentId) {
|
||||
loadTree(currentId);
|
||||
document.formDto.reset();
|
||||
}
|
||||
|
||||
function getInfo(data) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2128,7 +2128,7 @@ function SelectBox() {
|
||||
};
|
||||
actions.close = () => {
|
||||
$target.querySelector(`${selectComboBox} :last-child`).textContent =
|
||||
$target["options"][$target.selectedIndex]?.textContent ?? props.default;
|
||||
$target["options"]?.[$target.selectedIndex]?.textContent ?? props.default;
|
||||
closeState();
|
||||
};
|
||||
actions.select = () => {
|
||||
@@ -2276,7 +2276,30 @@ function SelectBox() {
|
||||
|
||||
function openState() {
|
||||
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) {
|
||||
// 전체 디바이스 높이에서 160px 제외
|
||||
const deviceHeight = window.innerHeight;
|
||||
const targetHeight = deviceHeight - 160;
|
||||
|
||||
// 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() {
|
||||
|
||||
Reference in New Issue
Block a user