File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ const Autofunction = ({
31
31
hideHeader,
32
32
deprecated,
33
33
deprecatedText,
34
+ oldStreamlitFunction,
34
35
} ) => {
35
36
const blockRef = useRef ( ) ;
36
37
const router = useRouter ( ) ;
@@ -133,7 +134,8 @@ const Autofunction = ({
133
134
} ;
134
135
135
136
const handleSelectVersion = ( event ) => {
136
- const functionObject = streamlit [ streamlitFunction ] ;
137
+ const functionObject =
138
+ streamlit [ streamlitFunction ] ?? streamlit [ oldStreamlitFunction ] ;
137
139
const slicedSlug = slug . slice ( ) ;
138
140
139
141
if ( event . target . value !== currentVersion ) {
@@ -170,8 +172,9 @@ const Autofunction = ({
170
172
let methods = [ ] ;
171
173
let properties = [ ] ;
172
174
173
- if ( streamlitFunction in streamlit ) {
174
- functionObject = streamlit [ streamlitFunction ] ;
175
+ if ( streamlitFunction in streamlit || oldStreamlitFunction in streamlit ) {
176
+ functionObject =
177
+ streamlit [ streamlitFunction ] ?? streamlit [ oldStreamlitFunction ] ;
175
178
isClass = functionObject . is_class ;
176
179
if (
177
180
functionObject . description !== undefined &&
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ export default function Article({
155
155
version = { version }
156
156
versions = { versions }
157
157
slug = { slug }
158
+ oldStreamlitFunction = { props . oldName ?? "" }
158
159
/>
159
160
) ,
160
161
pre : ( props ) => < Code { ...props } /> ,
You can’t perform that action at this time.
0 commit comments