►
Description
PnP Shorts Guidance video around how to correctly handle numeric web part property configuration values. Considerations around text editor usage in the web part properties for end user input.
A
B
B
So
if
you
use
two
of
them,
you
want
to
show
the
latest
one
on
top
and
then
the
next
three
next
right-
and
here
we
actually
see
the
last
one
implies
so
in
the
other
web
part,
we
won't
actually
skip
through
the
first
and
document
so
that
documents
out
that
we
see
are
actually
second,
third
and
fourth
and
the
other
web
part
should
show
three
dogs.
So
here
we
say,
skip
experts
document
one
and
while
it
did
skip
the
first
document,
because
now
it
shows
a
second
third
and
fourth,
it
also
shows
fifth.
B
B
So
here
we
have
in
it
to
which
we
we
has
the
number
that
we
entered
and-
and
it
is
a
number-
and
we
pass
it
to
our
documents
service
here
here-
that
we
use
to
access
to
actually
get
documents
and
we
use
for
that-
a
fixed
array
that
we
we
slice.
So
we
say
we
start
start
from
one
and
we
want
to
go
until
four,
so
one
plus
three
is
four,
but
that
does
not
work
quite
the
way.
B
B
What
the
value
is
that
we
actually
get
so,
let's
really
reload
the
workbench,
and
now
you
can
see
here
that
the
value
is
not,
as
you
would
think,
for
virtually
it's
thirteen.
So
with
that,
you,
you
know
see
that
it
does
not
add
the
numbers,
but
it
actually
adds
it
as
a
string.
So
it
adds
one
and
three
as
a
string.
So
how
come
that?
It
is
that
way,
even
the
despite
the
fact
that,
in
all
of
our
code,
we
in
in
in
structured
the
code,
then
we
work
with
a
number
well.
B
The
whole
trick
is
that
if
we
go
back
to
web
part-
which
is
here
in
our
case,
we
use
the
property
pane
text
suit,
to
manage
the
value
and
the
thing
with
property
paint
textual.
Is
that
what
it
gives
back?
The
value
that
you
entered
is
not
the
number,
but
it
is
actually
a
string.
So,
even
though
that
everywhere
inside
sign
manifests,
we
say
that
we
have
the
number
in
our
web
properties
interface.
We
say
that
we
had
to
have
the
number
throughout
all
of
our
code.
We
say
that
we
work
with
a
number.
B
We
actually
don't
and
it
works
fine
in
typescript.
It
compiles,
but
actually
the
place
where
the
property
plain
text
field
assigns
the
value
that
user
entered
in
the
field
to
our
property
at
that
point,
divided
as
being
assigned
back,
is
actually
a
string
and
actually
on
the
problem
that
we
have
now.
Is
that
because
we
said
that
we
have
a
number,
we
cannot
do
something
here
like
a
parse
int,
because
parse
int
requires
a
string.
So
one
way
to
deal
with
that
would
be
to
change
the
value
to
a
string.
B
So
here
we
would
go
to
our
manifest,
and
here
we
would
say
it's
not
a
zero,
but
if
a
string,
then
we
would
go
to
our
properties
and
we
would
say
that's
a
string
and
then
we
would
change
it
basically
everywhere
throughout
the
web
part
to
tell
that
is
a
string
and
then
in
our
code.
Eventually,
what
we
would
do
here
is
that
we
would
change
that
string
as
well.
B
So
here,
first
of
all
we
would
say:
let
start
start
string
and
we
would
say
it
or
start
would
call
it
parse
in
start
from,
and
actually
the
best
part
is
that
at
this
point,
imagine
that
somebody
would
enter
text.
So
we
cannot
assume
that
whatever
we
have
here
is
actually
a
number.
So
here
we
would
say
number,
but
here
we
have
to
still
check.
If
it's
not
a
number,
then
we
have
to
assign
to
it
a
number
like
this
and
that
way
we
could
then
do
with
it.
B
But
if
you
can
imagine
if
all
you
really
want
is
a
number-
that's
not
really
the
right
approach
right.
So
another
thing
that
you
can
do
and
which
is
easier
right.
Let's
just
fix
that
here,
so
so
so
that
we
have
the
warning
that
we
can
check
in
our
logs
that
everything
works.
The
way
it's
supposed
to
be
so
that
this
one,
let's
revert
that
to
a
number,
that's
correct:
let's
change
all
of
that.
B
Okay
and
then
we
go
back
to
our
properties.
We
change
that
to
number
two.
Our
Manifest
we've
been
there
webpart
and
actually
what
we
can
do
here
is
instead
using
the
property
plain
text
field,
we
can
use
another
thing
which
is
a
slider
and
here
with
that,
what
we
get
back
is
actually
the
number
that
we
want
to
have.
So
here
we
say
min
max.
B
So
these
are
the
ranges
in
which
we
operate
and
we
say
step
is
1
so
that
users
can
increase
it
per
one
code,
is
rebuilding
webparts
should
refresh,
and
now
let
me
remove
the
web
part.
Let
me
rewrite
it
to
the
page
and
now,
when
we
switch
that
to
1
you're,
going
to
see
that
the
webparts
skips
first
one
and
shows
two
three
four,
and
if
we
now
check
the
logs,
we
cannot
see
actually
four,
which
is
the
value
that
we
want
to
have.
B
So
the
thing
that
you
should
keep
in
mind
is
that
whenever
you
work
with
numbers
in
property
payment
you
have
to
use,
you
should
avoid
the
property
pain
text
field,
because
what
it
gives
you
back
is
a
string,
not
a
number
and
with
that,
if
all
throughout
the
code,
you
will
say
that
you
have
a
number
on
runtime.
Only
then
you
will
actually
see
that
the
value
you
get
is
not
the
value
that
you
expect
it
right
and
you
won't
be
able
to
to
catch
that
earlier.