ant-design / ant-design/pro-components

🐛[BUG]使用columnsState后,在移动端设置fixed:false时,由于sistenceType: 'localStorage'倒置fixed没有变化,该怎么办才能让fixed:false生效?

Open
#8,126 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

![image](https://github.com/ant-design/pro-components/assets/13252682/bc57d604-680e-493c-b2b5-700559b71368)
`const columnsState = useCreation(
() => ({
persistenceKey: 'clearance_lading',
persistenceType: 'localStorage',
onChange: (newState: any, oldState: any) => {
console.log('中啊啊啊', newState, oldState);
},
}),
[]
);`
当在columns列中移动端和pc端设置不同fixed时,会失效,值一直都是fixed:"right"

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided columnsState configuration and persistenceType: 'localStorage', comparing mobile and desktop column settings. Trace the columnsState persistence handling and verify that fixed:false on mobile takes effect without being overwritten by the saved fixed:'right' value.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.