casbin / casbin-hub

The hub for Casbin
https://dashboard.casbin.com
Apache License 2.0
87 stars 46 forks source link

Add rows in empty table #84

Open 6ecuk opened 4 years ago

6ecuk commented 4 years ago

@438561537 Instead compare table===undefined, need compare table===null https://github.com/casbin/casbin-dashboard/blob/0fbe9c4bb2de5b9383e9feccaa471d8bae5c1c8e/web/src/EnforcerTable.js#L42

Xiaoyang-Gu commented 4 years ago

Maybe we can delete these code? (〃'▽'〃) https://github.com/casbin/casbin-dashboard/blob/0fbe9c4bb2de5b9383e9feccaa471d8bae5c1c8e/web/src/AdapterTable.js#L38 Because when we start to add a new row, the table has already been a null table " [] ". console

6ecuk commented 4 years ago

Well, in practice a table is null i don't know why

6ecuk commented 4 years ago

@438561537 hi, you investigate this case ?

Xiaoyang-Gu commented 4 years ago

@6ecuk Actually, I am working for a new UI frame recently. In the new frame, when I add/edit an model/adapter/enforcer, it will route to another page(not to use addrow() method in the home page). When I finish the optimization job, I will uploading it after reviewing. Thank you for your attention!