csv-to-html-table icon indicating copy to clipboard operation
csv-to-html-table copied to clipboard

Refresh view if given file has changed

Open ctdany86 opened this issue 7 years ago • 5 comments

Hi, that's more of a question rather than an issue.

Looking at your code example, is it possible to listen to changes for 'data/Health Clinics in Chicago.csv' and refresh the view? The CSV I am using changes every 5min and I would like to keep the list view updated by adding a listener or hopefully setting some attribute/parameter/configuration. Thanks

ctdany86 avatar Sep 21 '18 12:09 ctdany86

Hi, that's more of a question rather than an issue.

Looking at your code example, is it possible to listen to changes for 'data/Health Clinics in Chicago.csv' and refresh the view? The CSV I am using changes every 5min and I would like to keep the list view updated by adding a listener or hopefully setting some attribute/parameter/configuration. Thanks

Hi Did you find a solution on this?, have the same issue

sedado22 avatar Aug 19 '21 21:08 sedado22

Anyone to help with this? This would be a very great feature, as I am using the code to render a list of publications. It would be nice to simply add new entries to the CSV file and see it on the page. Thanks!

bravemaster3 avatar Mar 07 '22 03:03 bravemaster3

Anyone to help with this? This would be a very great feature, as I am using the code to render a list of publications. It would be nice to simply add new entries to the CSV file and see it on the page. Thanks!

Oh, I just searched this and found some hints! It seems like the problem is caused by caches in your browser. When you close the browser and reopen, or if you open the page in a new browser, then the new entry in the CSV file shows.

bravemaster3 avatar Mar 07 '22 03:03 bravemaster3

Anyone to help with this? This would be a very great feature, as I am using the code to render a list of publications. It would be nice to simply add new entries to the CSV file and see it on the page. Thanks!

It seems like this is an issue related to Chrome. It refreshes fine for me when I use firefox and manually refresh the page. With google chrome the table doesn't update even after hitting refresh.

erichmatt avatar Mar 18 '22 00:03 erichmatt

Oh, I just searched this and found some hints! It seems like the problem is caused by caches in your browser. When you close the browser and reopen, or if you open the page in a new browser, then the new entry in the CSV file shows.

I circumvented the caching with adding random string to the csv link. Change:

            csv_path: "data/Health Clinics in Chicago.csv",

to

            csv_path: "data/Health Clinics in Chicago.csv?rndstr=<%= getRandomStr() %",

mohwald avatar Aug 10 '22 12:08 mohwald