File tree 2 files changed +8
-5
lines changed
streamlit_pdf_viewer/frontend/src
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ In the following table the list of parameters that can be provided to the `pdf_v
53
53
First, make sure that _ RELEASE = False in ` streamlit_pdf_viewer/__init__.py ` . To run the component in development mode, use the following commands:
54
54
55
55
``` shell
56
- streamlit run my_component /__init__.py
56
+ streamlit run streamlit_pdf_viewer /__init__.py
57
57
58
58
cd frontend
59
59
npm run serve
Original file line number Diff line number Diff line change 22
22
</template >
23
23
24
24
<script >
25
- import {onMounted , onUpdated , computed , ref } from " vue" ;
25
+ import { onMounted , onUpdated , computed , ref } from " vue" ;
26
26
import " pdfjs-dist/build/pdf.worker.entry" ;
27
27
import {getDocument } from " pdfjs-dist/build/pdf" ;
28
28
import {Streamlit } from " streamlit-component-lib" ;
@@ -42,7 +42,7 @@ export default {
42
42
if (isRenderingAllPages) {
43
43
return props .args .annotations ;
44
44
}
45
- const filteredAnnotations = props .args .annotations .filter (anno => {
45
+ const filteredAnnotations = props .args .annotations .filter (anno => {
46
46
return props .args .pages_to_render .includes (Number (anno .page ))
47
47
})
48
48
return filteredAnnotations;
@@ -167,7 +167,7 @@ export default {
167
167
168
168
const setFrameHeight = () => {
169
169
Streamlit .setFrameHeight (props .args .height || totalHeight .value );
170
- Streamlit .setComponentReady ();
170
+ // Streamlit.setComponentReady();
171
171
};
172
172
173
173
onMounted (() => {
@@ -178,7 +178,10 @@ export default {
178
178
setFrameHeight ();
179
179
});
180
180
181
- onUpdated (setFrameHeight);
181
+ onUpdated (() => {
182
+ setFrameHeight ();
183
+ });
184
+
182
185
183
186
return {
184
187
filteredAnnotations,
You can’t perform that action at this time.
0 commit comments