I took a look at the Shiny input binding for the file input in shiny.js, there is a FileUploader function but can't find anything in there or the fileInputBinding that resets the value of a file input after selection. The best solution to achieve a custom style is to create a new element (a button perhaps) that when clicked triggers the click event on this input element. Unfortunately, CSS can only style some things about this element, and I usually want more. Server = function(input, output, session) ) ) but how can I perform the check after the change event has taken place if the value of the file input isn't persistent? Typing $('#file').files.length into the console after selecting a file returns 0 for the Shiny app and 1 for the JSFiddle. The file input element is ugly and every browser displays it a little bit differently. Clicking the "Show selected file" button returns an empty FileList. In the Shiny app, when I select a file, the helper text briefly changes to the name of the selected file before reverting to "No file chosen". The app below contains a file input and a button that console.logs the FileList object of the file input when clicked.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |