Closed cssquirrel closed 7 years ago
Tempted to just use a regexp that looks for anything starting and ending with curley brackets...
Something like: /^{.*}$/
Should do it? If we find that they render out (or return in the API response) "Non-editable data" or similar (we don't wnat that chunk of JSON going down the wire, they could be huge and will make the site sluggish.
It would be pretty slick if the API didn't return these types of properties. But a regex solution like that on the front-end seems like a clean way to filter whatever comes in.
Lets make the API not return them then. Suggest we add a flag that says "no JSON content if found in fields" or similar which would make the API return a placeholder or something. Could just run that regex server-side to do it. I think the UI still needs to know that there IS some json content for those fields (so it can show something different) but it doesn't need to know what that content actually is.
We're currently filtering grid, we also now filter out already selected properties.
In particular, this is going to be valuable to avoid Grid properties. We actually get the grid JSON back, there just doesn't seem to be a good way to edit it in this format.
Also, prevent adding duplicates of the same field.