What I’m trying to do:
Basically I have a set of divs defined in my html/ css which when selected need to update the data tables in anvil, I want to use my custom styles thus I completely prefer to use my html and css. What I’ve tried and what’s not working:
The anvil api_js is somehow not working everytime, I have tried linking using native libraries and everything.
Do you have any links for documentation or code examples you’re following?
If I had to guess, it looks like the code is from an AI code generator that’s hallucinating. The javascript you’ve written isn’t valid anvil functions in JavaScript, and _/api.js isn’t a valid url for a native libraries script tag.
To hook up your elements to your python code, you might find this documentation helpful
If my workflow looks like this what approach do you suggest:
Fetch current state of the data from the data table as a vector
Pass it to the html js function so that it renders the divs according to present states.
User selects some divs which causes some data items to be changed
A python function pushes these changes back to the data tables.
Note that at no point I want to use anvil components the whole point of this workflow is that I want to utilize my existing html and CSS UI frames to render a data table beautifully rather than the mvp style of anvil.