# Page\_action= "native" not working as expected

**URL:** https://community.plotly.com/t/page-action-native-not-working-as-expected/79908
**Category:** Dash Python
**Tags:** question
**Created:** [November 7, 2023, 9:46am UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908 "2023-11-07T09:46:01Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![kanishkaK](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kanishkaK](https://community.plotly.com/u/kanishkaK)
#### Post date: [November 7, 2023, 9:46am UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/1 "2023-11-07T09:46:01Z")

</div>

html.Div(children=  
151 [  
152 dcc.Interval(  
153 id=‘interval-component’,  
154 interval= 30 \* 1000,  
155 n\_intervals=0  
156 ),  
157 dash\_table.DataTable(  
158 id=‘table’,  
159 columns= generate\_columns(time\_intervals),  
160 page\_size=50,  
161 # page\_current=0,  
162 page\_action= “native”,  
163  
164 data=history\_df.to\_dict(‘records’),  
This is a snippet of my code where the table is a child.  
 ![Screenshot 2023-11-07 151433](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/0/2/02a2f2cc1d24840a65c185e9c610b77e842c6726.png)

this is how to shows instead of arrows.

worth noting: I’ve styled my table “style\_table={‘height’: ‘400px’, ‘overflowY’: ‘auto’},” (in case that makes any difference.

---

<div class="post-metadata">

### Author: ![Berbere](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/berbere/32/25940_2.png) [@Berbere](https://community.plotly.com/u/Berbere)
#### Post date: [November 7, 2023, 11:04am UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/2 "2023-11-07T11:04:03Z")

</div>

Hey @kanishkaK,

Your problem is most likely due to styling. I would check the external style sheet and/or theme ( if you use any). If you do not use any of them; my second “go to” would be to check the version of dash\_table library. It might be the case that styling of a table was designed in that way in the earlier versions.

If you end up not finding a solution to your issue, feel free to share your full code in a reformatted text (by using \</\> button on top of the text input area). Unfortunately it is very hard to read your code.

Cheers!

---

<div class="post-metadata">

### Author: ![kanishkaK](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kanishkaK](https://community.plotly.com/u/kanishkaK)
#### Post date: [November 7, 2023, 12:40pm UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/3 "2023-11-07T12:40:31Z")

</div>

hey yeah I just cleaned my code. I don’t think there’s an issue with the style as it’s just fonts and colors.  
please take a look at it (I hope it’s cleaner.)

app = dash.Dash( **name** )

app.layout = html.Div(children=[  
html.Div(“HPC Perforce Infrastructure Monitoring Dashboard solutions”,  
className=‘dashboard-header’),  
html.H1(“Cheetah Perforce Project Status”, className=‘custom-heading’),  
html.H5(“End to end monitoring of Cheetah Perforce for each project”, className=“custom-heading”),  
html.Div([  
html.Button(“Synced”, className=‘custom-button-green’, title=“Green Button”),  
html.Button(“Not Synced”, className=‘custom-button-red’, title=“Red Button”),  
]),  
html.Div(children=[  
dcc.Interval(id=‘interval-component’, interval=30 \* 1000, n\_intervals=0),  
dash\_table.DataTable(  
id=‘table’,  
columns=generate\_columns(time\_intervals),  
page\_size=50,  
page\_action=“native”,  
data=history\_df.to\_dict(‘records’),  
style\_data\_conditional=style\_condition,  
style\_header={‘backgroundColor’: ‘#1d3557’, ‘fontWeight’: ‘bold’, ‘color’: ‘white’},  
style\_cell={‘whiteSpace’: ‘normal’, ‘textAlign’: ‘center’},  
style\_table={‘height’: ‘400px’, ‘overflowY’: ‘auto’}  
)  
])  
])

---

<div class="post-metadata">

### Author: ![Berbere](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/berbere/32/25940_2.png) [@Berbere](https://community.plotly.com/u/Berbere)
#### Post date: [November 7, 2023, 1:07pm UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/4 "2023-11-07T13:07:44Z")

</div>

Hey @kanishkaK

Here I reproduce a table with your `dash_table.DataTable()` props, It works as expected for me.

```auto
from dash import Dash, dash_table, html
from plotly.express import data

app = Dash( __name__ )

df= data.election()

app.layout = html.Div(children=[
                    dash_table.DataTable(
                    id="table",
                    columns=[{"name": i, "id": i} for i in df.columns],
                    page_size=50,
                    page_action="native",
                    data=df.to_dict("records"),
                    #style_data_conditional=style_condition,
                    style_header={'backgroundColor': '#1d3557', 'fontWeight': 'bold', 'color': 'white'},
                    style_cell={"whiteSpace": "normal", "textAlign": "center"},
                    style_table={"height": "400px", "overflowY": "auto"},
                    )
                ])
                      
if __name__ == ' __main__':
    app.run(debug=True)

```

 ![Screenshot 2023-11-07 at 16.07.16](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/5/1/5118c2f3f08c0d92662ee7ed95a0a041d4c98268.png)

Could you please copy & paste and run this code and share the output for me?

By the way I am getting this output on a Safari browser.

---

<div class="post-metadata">

### Author: ![kanishkaK](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kanishkaK](https://community.plotly.com/u/kanishkaK)
#### Post date: [November 7, 2023, 1:56pm UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/5 "2023-11-07T13:56:25Z")

</div>

Hey, I’m getting the same buttons but I couldn’t import data-table from dash. I was getting error "ImportError: cannot import name ‘dash\_table’ from ‘dash’ "  
This is how I had to change the code to get it to run. I’m running it on a server and not my local machine.

import dash  
import dash\_html\_components as html  
import dash\_table  
from plotly.express import data

app = dash.Dash( **name** )

df= data.election()

app.layout = html.Div(children=[  
dash\_table.DataTable(  
id=“table”,  
columns=[{“name”: i, “id”: i} for i in df.columns],  
page\_size=50,  
page\_action=“native”,  
data=df.to\_dict(“records”),  
#style\_data\_conditional=style\_condition,  
style\_header={‘backgroundColor’: ‘#1d3557’, ‘fontWeight’: ‘bold’, ‘color’: ‘white’},  
style\_cell={“whiteSpace”: “normal”, “textAlign”: “center”},  
style\_table={“height”: “400px”, “overflowY”: “auto”},  
)  
])

if **name** == ‘ **main** ’:  
app.run\_server(host=‘0.0.0.0’, port=8050, debug=True)

---

<div class="post-metadata">

### Author: ![kanishkaK](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kanishkaK](https://community.plotly.com/u/kanishkaK)
#### Post date: [November 7, 2023, 1:57pm UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/6 "2023-11-07T13:57:07Z")

</div>

![Screenshot 2023-11-07 192647](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/f/4/f452842aac15a43f2c1565041ac3f602d74a461a.png)

---

<div class="post-metadata">

### Author: ![Berbere](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/berbere/32/25940_2.png) [@Berbere](https://community.plotly.com/u/Berbere)
#### Post date: [November 7, 2023, 2:19pm UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/7 "2023-11-07T14:19:57Z")

</div>

Hey again @kanishkaK,

Ahaaa!  
As I suspected; you are using the old version of Dash.

> As of Dash 2, the development of Dash Table has been moved to the [main Dash repo](https://github.com/plotly/dash)

I would suggest you to uninstall dash and dash\_table packages and re-install dash again!

Cheers!

---

<div class="post-metadata">

### Author: ![kanishkaK](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kanishkaK](https://community.plotly.com/u/kanishkaK)
#### Post date: [November 7, 2023, 2:30pm UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/8 "2023-11-07T14:30:58Z")

</div>

I did that, I don’t know what’s happening. I’ll check again tomorrow ☹

---

<div class="post-metadata">

### Author: ![kanishkaK](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kanishkaK](https://community.plotly.com/u/kanishkaK)
#### Post date: [November 8, 2023, 4:41am UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/9 "2023-11-08T04:41:01Z")

</div>

Hey @Berbere ,  
I’ve the latest version of dash 2.14.1 and it’s still not able to import dash\_table from it.  
These are the versions I have.

dash 2.14.1  
dash-core-components 2.0.0  
dash-html-components 2.0.0  
dash-table 5.0.0

---

<div class="post-metadata">

### Author: ![Berbere](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/berbere/32/25940_2.png) [@Berbere](https://community.plotly.com/u/Berbere)
#### Post date: [November 8, 2023, 5:59am UTC](https://community.plotly.com/t/page-action-native-not-working-as-expected/79908/10 "2023-11-08T05:59:13Z")

</div>

Hey @kanishkaK,

Are you on a IDE? If yes, please check whether it uses the right python path. Alternatively, you can create a conda environment, activate it and installl your dash packages in it.

Cheers!
