« first day (3588 days earlier)      last day (1582 days later) » 

00:00
If there is 1 array
Ummm
i don't see why you need the blob, the file object is a blob
|| mdn file
How to show the preview?
Currently I use
var imagePreviewUrl = URL.createObjectURL(file)
The file object can't directly be used to show preview
yes, like that
In order to have imagePreviewUrl in my HTML
Should I push it to new array?
or do like this:
file.preview = URL.createObjectURL(file)
00:03
creativeImagesAsFiles.map(file => <img src={URL.createObjectURL(file)}/>)
2nd approach will allow using only 1 array
Exactly. Now here's the problem
When editing the form
I'll be getting the images as Array
not file objects
so this code won't work:
creativeImagesAsFiles.map(file => <img src={URL.createObjectURL(file)}/>)
You will be getting the input as a URL
 imageURL.map(url => <img src={url}/>)
so it will basically look like this:
<div>
    {currentInput.images.map(url => <img key={url} src={url}/>)}
    {newInput.images.map((file,i) => <img key={i} src={URL.createObjectURL(file)}
</div>
so 2 loops?
and 2 arrays?
yes, only for the edit
for the initial creation only one
but it's really two seperate objects, your old and new
or you could do it a bit differently like this
<div>
    {input.images.map(val => <img src={typeof val === "string" ? val : URL.createObjectURL(val)}/>)}
</div>
or something similar
okay, how to find out which existing image is deleted?
00:11
you just check if it's an image id or blob data
i'm not giving you the full code, you gotta do that by yourself
these are just conceptual examples
I'll do it. I'm just taking some guideline
 
3 hours later…
03:24
need help on getting a current value for react-select search box. anyone? here is the code codesandbox.io/s/objective-banach-9qvyy?file=/src/components/…
 
10 hours later…
13:17
0
Q: NodeJS Using decorators with a singleton class does not save the state of the class after init

Ben BeriI have a class MongoQueryResolver which contains a dictionary: private queries: {[key: string]: (params) => any} = {}; This dictionary holds functions by a key, where each function is a query function to MongoDB. I have created a decorator MongoQuery which represents a mongo query function: expo...

13:28
Hi, I'm having trouble with a function modifying a variable that I'm passing in. I don't expect it to, but it is.
I know that things are passed by reference, but I am only using a getXXX function on the object, so I don't expect it to change.
haha nevermind, solved it, was shadowing another function that I wrote with the same name :)
14:04
Need help in trigger tool tip on keyboard focus
<p id="tabCloseSeparator"
class="ibm-ind-link ibm-icononly margin-left-16px product-tour-separator ibm-fright "> </p>
<p id="sharep" onclick="test()" class=" ibm-ind-link margin-left-16px ibm-fright ">
<a id="useCaseShare" style="color:#0062FF !important" tabindex="5" data-widget="tooltip"
data-contentid="shareLinkToopTip" href="javascript:void(0)"
class="ibm-share-mono-link fontSize16">Share</a></p>
14:16
Good Morning. I am making an AJAX request, where you are importing data from a mysql table, into WebSQL on the cell phone.
What I need is that you only change the screen once the import is complete.
But it is leading to the other page before completion.
I'm using the "complete" event, but it still changes screens before.
well, yea
complete isn't gonna wait for some async stuff in success to finish
it can't
it's unaware of it, and can't be made aware of it.
!!afk
@KevinB bye Kevin B
14:35
Is there anything I can do to change the screen only after importing?
 
1 hour later…
15:50
Can anyone help witht this please?

https://stackoverflow.com/questions/63359670/how-to-get-accesstoken-dynamically-from-cognito-oauth2-0-in-electron-js
16:02
I don't have any experience with Amazon Cognito, but I'll give you an upvote :)
@RedVelocity Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
I'm trying to serve a static react app built from webpack from express.static, but it's serving blank page. Upon investigation, I've noticed that it's loaded js as html
any help would be greatly appreciated
app.use(express.static(path.join(__dirname, 'client/dist')));
app.get('*', (req, res) =>
  res.sendFile(path.join(__dirname, '/client/dist/index.html'))
);
if your HTML page is already in the statics, why the second rule?
second rule is for routing, first rule is supposed to serve the whole app
the static middleware is resolving before, then for a matching rule declared after is never called
16:37
app.use is not a route
app.get is
internally, app.use declares a route to match the assets
which is resolved before
so should I flip those routes?
shouldn't assets be resolved before routes?
maybe split your dist to something like /dist/assets and /dist/templates
its a single page app with index.html and bundle.js
then, in your JS app.use(express.static(path.join(__dirname, '/dist/assets')))
16:41
generated by webpack
yeah but see around the webpack entrypoints
const {
  count,
  segments
} = this.config;
how is this syntax called?
destructuring
16:56
      getData(key: string, def?: any): any {
        if (this.data == null) {
          this.data = Object.create(null);
        }
        let val = this.data[key];
        if (val === undefined && def !== undefined) val = this.data[key] = def;
        return val;
 }
|| starspam
Invalid command! Did you mean: stars, smartass, restart? Try help for a list of available commands..‍
the star feature is not meant to be used as a "like" feature. Please respect it
Can smb explain what def?: any mean in the code above?
thats typescript
uh I haven't learnt that
16:57
@user36339 Typescript Optional Parameter
@DivinIrakiza Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@user36339 if you don't want to use typescript just remove the type declarations
getData(key, def) {
And add function to get Data ie

function getData(key, def) {
Oh thanks! The code I shared was from babel. I was reading the source code.
any JSDoc user, actually, please?
16:59
|| welcome Lcf.vs
@Lcf.vs Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@JBis yeah, I know but the question was already provided some days ago but noone on JSDoc :| stackoverflow.com/questions/63339847/…
17:31
i just wrote my first custom hook yey!
custom hook?
react hooks
ah, ok, sorry, I never used react... I use my own (free) approach to write the client
(SSR based)
react is free
but what do you use?
;)
yeah, I mean "free too"
17:40
hmm, it's backed by jetbrains
interesting
17:56
sorry if the demo isn't beautiful, the design and me :|
 
1 hour later…
19:05
posted on August 12, 2020 by Krishna Govind

 The beta channel has been updated to 85.0.4183.69 for Mac, Windows and Linux platforms A full list of changes in this build is available in the log. Interested in switching release channels?  Find out how here. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Google Ch

 
1 hour later…
20:12
20:59
posted on August 12, 2020 by Bindu Suvarna

Hi, everyone! We've just released Chrome Beta 85 (85.0.4183.69) for iOS: it'll become available on App Store in next few days. You can see a partial list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Bindu Suvarna Google Chrome

21:40
mornins
does anyone know if there's a way to configure rollup to transform sveltejs bundles into ie compatible bundles?
 
1 hour later…
22:52
this channel is so shit
like how does this guy 274k subscribers
thats 274k shit js devs right there
condition ? true_val : false_val
boom, you learned ternary operators in 10 seconds
Lmao
@JBis JBis be raging

« first day (3588 days earlier)      last day (1582 days later) »